diff --git a/modules/schematics/src/container/index.spec.ts b/modules/schematics/src/container/index.spec.ts index 899f4f8e53..d7e32bd4de 100644 --- a/modules/schematics/src/container/index.spec.ts +++ b/modules/schematics/src/container/index.spec.ts @@ -118,10 +118,21 @@ describe('Container Schematic', () => { `${projectPath}/src/app/foo/foo.component.spec.ts` ); expect(content).toMatch( - /import { Store, StoreModule } from '@ngrx\/store';/ + /import { provideMockStore, MockStore } from '@ngrx\/store\/testing';/ ); }); + it('should use the provideMockStore helper', async () => { + const options = { ...defaultOptions, spec: true }; + const tree = await schematicRunner + .runSchematicAsync('container', options, appTree) + .toPromise(); + const content = tree.readContent( + `${projectPath}/src/app/foo/foo.component.spec.ts` + ); + expect(content).toMatch(/providers: \[ provideMockStore\(\) \]/); + }); + it('should inject Store correctly', async () => { const options = { ...defaultOptions, spec: true }; const tree = await schematicRunner @@ -130,6 +141,6 @@ describe('Container Schematic', () => { const content = tree.readContent( `${projectPath}/src/app/foo/foo.component.spec.ts` ); - expect(content).toMatch(/store = TestBed\.get\(Store\);/); + expect(content).toMatch(/store = TestBed\.get\(Store\);/); }); });