1- import {
2- checkFilesExist ,
3- ensureNxProject ,
4- readJson ,
5- runNxCommandAsync ,
6- uniq
7- } from '@nrwl/nx-plugin/testing' ;
1+ import { checkFilesExist , ensureNxProject , readJson , runNxCommandAsync , uniq } from '@nrwl/nx-plugin/testing' ;
82describe ( 'ddd e2e' , ( ) => {
9- it ( 'should create ddd' , async done => {
3+ it ( 'should create ddd' , async ( done ) => {
104 const plugin = uniq ( 'ddd' ) ;
115 ensureNxProject ( '@xmlking/nxp-ddd' , 'dist/libs/ddd' ) ;
126 await runNxCommandAsync ( `generate @xmlking/nxp-ddd:domain ${ plugin } ` ) ;
@@ -18,26 +12,20 @@ describe('ddd e2e', () => {
1812 } ) ;
1913
2014 describe ( '--directory' , ( ) => {
21- it ( 'should create src in the specified directory' , async done => {
15+ it ( 'should create src in the specified directory' , async ( done ) => {
2216 const plugin = uniq ( 'ddd' ) ;
2317 ensureNxProject ( '@xmlking/nxp-ddd' , 'dist/libs/ddd' ) ;
24- await runNxCommandAsync (
25- `generate @xmlking/nxp-ddd:domain ${ plugin } --platform web`
26- ) ;
27- expect ( ( ) =>
28- checkFilesExist ( `libs/${ plugin } /domain/src/index.ts` )
29- ) . not . toThrow ( ) ;
18+ await runNxCommandAsync ( `generate @xmlking/nxp-ddd:domain ${ plugin } --platform web` ) ;
19+ expect ( ( ) => checkFilesExist ( `libs/${ plugin } /domain/src/index.ts` ) ) . not . toThrow ( ) ;
3020 done ( ) ;
3121 } ) ;
3222 } ) ;
3323
3424 describe ( '--lazy' , ( ) => {
35- it ( 'should add tags to nx.json' , async done => {
25+ it ( 'should add tags to nx.json' , async ( done ) => {
3626 const plugin = uniq ( 'ddd' ) ;
3727 ensureNxProject ( '@xmlking/nxp-ddd' , 'dist/libs/ddd' ) ;
38- await runNxCommandAsync (
39- `generate @xmlking/nxp-ddd:domain ${ plugin } --lazy`
40- ) ;
28+ await runNxCommandAsync ( `generate @xmlking/nxp-ddd:domain ${ plugin } --lazy` ) ;
4129 const nxJson = readJson ( 'nx.json' ) ;
4230 expect ( nxJson . projects [ plugin ] . tags ) . toEqual ( [ 'e2etag' , 'e2ePackage' ] ) ;
4331 done ( ) ;
0 commit comments