fixed tests
This commit is contained in:
parent
c24fa13ce4
commit
0da5fbc89e
@ -8,7 +8,7 @@ describe('addNgRxToModule', () => {
|
|||||||
|
|
||||||
it('should add root configuration', () => {
|
it('should add root configuration', () => {
|
||||||
newApp('new proj --skipInstall');
|
newApp('new proj --skipInstall');
|
||||||
runSchematic('@nrwl/ext:addNgRxToModule --module=src/app/app.module.ts --root', {cwd: 'proj'});
|
runSchematic('@nrwl/nx:addNgRxToModule --module=src/app/app.module.ts --root', {cwd: 'proj'});
|
||||||
|
|
||||||
checkFilesExists(
|
checkFilesExists(
|
||||||
`proj/src/app/+state/app.actions.ts`,
|
`proj/src/app/+state/app.actions.ts`,
|
||||||
@ -33,7 +33,7 @@ describe('addNgRxToModule', () => {
|
|||||||
|
|
||||||
it('should add empty root configuration', () => {
|
it('should add empty root configuration', () => {
|
||||||
newApp('new proj2 --skipInstall');
|
newApp('new proj2 --skipInstall');
|
||||||
runSchematic('@nrwl/ext:addNgRxToModule --module=src/app/app.module.ts --emptyRoot', {cwd: 'proj2'});
|
runSchematic('@nrwl/nx:addNgRxToModule --module=src/app/app.module.ts --emptyRoot', {cwd: 'proj2'});
|
||||||
|
|
||||||
const contents = readFile('proj2/src/app/app.module.ts');
|
const contents = readFile('proj2/src/app/app.module.ts');
|
||||||
expect(contents).toContain('StoreModule.forRoot');
|
expect(contents).toContain('StoreModule.forRoot');
|
||||||
@ -46,7 +46,7 @@ describe('addNgRxToModule', () => {
|
|||||||
|
|
||||||
it('should add feature configuration', () => {
|
it('should add feature configuration', () => {
|
||||||
newApp('new proj3 --skipInstall');
|
newApp('new proj3 --skipInstall');
|
||||||
runSchematic('@nrwl/ext:addNgRxToModule --module=src/app/app.module.ts', {cwd: 'proj3'});
|
runSchematic('@nrwl/nx:addNgRxToModule --module=src/app/app.module.ts', {cwd: 'proj3'});
|
||||||
|
|
||||||
checkFilesExists(
|
checkFilesExists(
|
||||||
`proj3/src/app/+state/app.actions.ts`,
|
`proj3/src/app/+state/app.actions.ts`,
|
||||||
@ -65,7 +65,7 @@ describe('addNgRxToModule', () => {
|
|||||||
|
|
||||||
it('should generate files without importing them', () => {
|
it('should generate files without importing them', () => {
|
||||||
newApp('new proj4 --skipInstall');
|
newApp('new proj4 --skipInstall');
|
||||||
runSchematic('@nrwl/ext:addNgRxToModule --module=src/app/app.module.ts --skipImport', {cwd: 'proj4'});
|
runSchematic('@nrwl/nx:addNgRxToModule --module=src/app/app.module.ts --skipImport', {cwd: 'proj4'});
|
||||||
|
|
||||||
checkFilesExists(
|
checkFilesExists(
|
||||||
`proj4/src/app/+state/app.actions.ts`,
|
`proj4/src/app/+state/app.actions.ts`,
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
rm -rf node_modules/@nrwl
|
rm -rf node_modules/@nrwl
|
||||||
mkdir -p node_modules/@nrwl
|
mkdir -p node_modules/@nrwl
|
||||||
cp -r build/src node_modules/@nrwl/ext
|
cp -r build/src node_modules/@nrwl/nx
|
||||||
cp package.json node_modules/@nrwl/ext/package.json
|
cp package.json node_modules/@nrwl/nx/package.json
|
||||||
|
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
jest --maxWorkers=1 ./build/e2e
|
jest --maxWorkers=1 ./build/e2e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user