diff --git a/projects/angular-redux/schematics/ng-add/index.spec.ts b/projects/angular-redux/schematics/ng-add/index.spec.ts index 76c7245..24e0312 100644 --- a/projects/angular-redux/schematics/ng-add/index.spec.ts +++ b/projects/angular-redux/schematics/ng-add/index.spec.ts @@ -101,11 +101,11 @@ describe('Store ng-add Schematic', () => { const content = tree.readContent(`${projectPath}/src/app/app.config.ts`); const files = tree.files; - expect(content).toMatch(/provideStore\(\)/); - expect(content).not.toMatch( + expect(content).toMatch(/provideRedux\(\{ store \}\)/); + expect(content).toMatch( /import { store } from '\.\/store';/ ); - expect(files.indexOf(`${projectPath}/src/app/store/index.ts`)).toBe( + expect(files.indexOf(`${projectPath}/src/app/store/index.ts`)).not.toBe( -1 ); }); diff --git a/projects/angular-redux/schematics/ng-add/index.ts b/projects/angular-redux/schematics/ng-add/index.ts index 0ad8d95..c17cda2 100644 --- a/projects/angular-redux/schematics/ng-add/index.ts +++ b/projects/angular-redux/schematics/ng-add/index.ts @@ -94,7 +94,7 @@ function addImportToNgModule(options: AngularReduxOptions): Rule { }; } -const angularReduxPackageMeta = fs.readFileSync(path.resolve(__dirname, '../../package.json')) as unknown as { +const angularReduxPackageMeta = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../package.json'), "utf8")) as unknown as { version: string; peerDependencies: { [key: string]: string;