Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/create-gen-app/__tests__/licenses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ describe('license templates', () => {
'BSD-3-CLAUSE',
'UNLICENSE',
'MPL-2.0',
'CLOSED',
])
);
});

it('renders CLOSED license with author and email', () => {
const content = renderLicense('CLOSED', context);
expect(content).toContain('Test User');
expect(content).toContain('<[email protected]>');
expect(content).toContain('2099');
expect(content).toContain('All Rights Reserved');
});

it('handles case-insensitive lookups', () => {
expect(isSupportedLicense('mit')).toBe(true);
expect(renderLicense('mit', { author: 'User' })).toContain('User');
Expand Down
20 changes: 20 additions & 0 deletions packages/create-gen-app/licenses-templates/CLOSED.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) {{YEAR}} {{AUTHOR}}{{EMAIL_LINE}}

All Rights Reserved.

This software and associated documentation files (the "Software") are the
exclusive property of the copyright holder. No part of the Software may be
reproduced, distributed, modified, or transmitted in any form or by any means,
including photocopying, recording, or other electronic or mechanical methods,
without the prior written permission of the copyright holder.

Unauthorized copying, modification, distribution, or use of this Software,
via any medium, is strictly prohibited.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.