-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
413cc0e
commit 8c03ea9
Showing
19 changed files
with
9,003 additions
and
7,208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,41 @@ | ||
import { | ||
checkFilesExist, | ||
ensureNxProject, | ||
readJson, | ||
runNxCommandAsync, | ||
uniq, | ||
} from '@nrwl/nx-plugin/testing'; | ||
describe('typescript e2e', () => { | ||
it('should create typescript', async (done) => { | ||
const plugin = uniq('typescript'); | ||
ensureNxProject('@nx-dotnet/typescript', 'dist/packages/typescript'); | ||
await runNxCommandAsync( | ||
`generate @nx-dotnet/typescript:typescript ${plugin}` | ||
); | ||
// it('should create typescript', async (done) => { | ||
// const plugin = uniq('typescript'); | ||
// ensureNxProject('@nx-dotnet/typescript', 'dist/packages/typescript'); | ||
// await runNxCommandAsync( | ||
// `generate @nx-dotnet/typescript:typescript ${plugin}` | ||
// ); | ||
|
||
const result = await runNxCommandAsync(`build ${plugin}`); | ||
expect(result.stdout).toContain('Executor ran'); | ||
// const result = await runNxCommandAsync(`build ${plugin}`); | ||
// expect(result.stdout).toContain('Executor ran'); | ||
|
||
done(); | ||
}); | ||
// done(); | ||
// }); | ||
|
||
describe('--directory', () => { | ||
it('should create src in the specified directory', async (done) => { | ||
const plugin = uniq('typescript'); | ||
ensureNxProject('@nx-dotnet/typescript', 'dist/packages/typescript'); | ||
await runNxCommandAsync( | ||
`generate @nx-dotnet/typescript:typescript ${plugin} --directory subdir` | ||
); | ||
expect(() => | ||
checkFilesExist(`libs/subdir/${plugin}/src/index.ts`) | ||
).not.toThrow(); | ||
done(); | ||
}); | ||
}); | ||
// describe('--directory', () => { | ||
// it('should create src in the specified directory', async (done) => { | ||
// const plugin = uniq('typescript'); | ||
// ensureNxProject('@nx-dotnet/typescript', 'dist/packages/typescript'); | ||
// await runNxCommandAsync( | ||
// `generate @nx-dotnet/typescript:typescript ${plugin} --directory subdir` | ||
// ); | ||
// expect(() => | ||
// checkFilesExist(`libs/subdir/${plugin}/src/index.ts`) | ||
// ).not.toThrow(); | ||
// done(); | ||
// }); | ||
// }); | ||
|
||
describe('--tags', () => { | ||
it('should add tags to nx.json', async (done) => { | ||
const plugin = uniq('typescript'); | ||
ensureNxProject('@nx-dotnet/typescript', 'dist/packages/typescript'); | ||
await runNxCommandAsync( | ||
`generate @nx-dotnet/typescript:typescript ${plugin} --tags e2etag,e2ePackage` | ||
); | ||
const nxJson = readJson('nx.json'); | ||
expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']); | ||
done(); | ||
}); | ||
}); | ||
// describe('--tags', () => { | ||
// it('should add tags to nx.json', async (done) => { | ||
// const plugin = uniq('typescript'); | ||
// ensureNxProject('@nx-dotnet/typescript', 'dist/packages/typescript'); | ||
// await runNxCommandAsync( | ||
// `generate @nx-dotnet/typescript:typescript ${plugin} --tags e2etag,e2ePackage` | ||
// ); | ||
// const nxJson = readJson('nx.json'); | ||
// expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']); | ||
// done(); | ||
// }); | ||
// }); | ||
}); |
Oops, something went wrong.