parent
53a0528d7a
commit
3c39c311f8
@ -34,7 +34,7 @@ export function normalizeOptions(
|
||||
|
||||
const name = names(options.name).fileName;
|
||||
const projectDirectory = options.directory
|
||||
? `${names(options.directory).fileName}/${name}`
|
||||
? `${names(options.directory).fileName}/${name}`.replace(/\/+/g, '/')
|
||||
: name;
|
||||
|
||||
const { libsDir, npmScope, standaloneAsDefault } = getWorkspaceLayout(host);
|
||||
|
||||
@ -46,6 +46,13 @@ describe('lib', () => {
|
||||
tree = createTreeWithEmptyWorkspace(2);
|
||||
});
|
||||
|
||||
it('should run the library generator without erroring if the directory has a trailing slash', async () => {
|
||||
// ACT & ASSERT
|
||||
await expect(
|
||||
runLibraryGeneratorWithOpts({ directory: 'mylib/shared/' })
|
||||
).resolves.not.toThrow();
|
||||
});
|
||||
|
||||
it('should default to standalone project for first project', async () => {
|
||||
await runLibraryGeneratorWithOpts();
|
||||
const workspaceJsonEntry = readJson(tree, 'workspace.json').projects[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user