Skip to content

Commit d7881b3

Browse files
committed
chore: fix tests
1 parent 243cbde commit d7881b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

projects/angular-redux/schematics/ng-add/index.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ describe('Store ng-add Schematic', () => {
101101
const content = tree.readContent(`${projectPath}/src/app/app.config.ts`);
102102
const files = tree.files;
103103

104-
expect(content).toMatch(/provideStore\(\)/);
105-
expect(content).not.toMatch(
104+
expect(content).toMatch(/provideRedux\(\{ store \}\)/);
105+
expect(content).toMatch(
106106
/import { store } from '\.\/store';/
107107
);
108-
expect(files.indexOf(`${projectPath}/src/app/store/index.ts`)).toBe(
108+
expect(files.indexOf(`${projectPath}/src/app/store/index.ts`)).not.toBe(
109109
-1
110110
);
111111
});

projects/angular-redux/schematics/ng-add/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function addImportToNgModule(options: AngularReduxOptions): Rule {
9494
};
9595
}
9696

97-
const angularReduxPackageMeta = fs.readFileSync(path.resolve(__dirname, '../../package.json')) as unknown as {
97+
const angularReduxPackageMeta = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../package.json'), "utf8")) as unknown as {
9898
version: string;
9999
peerDependencies: {
100100
[key: string]: string;

0 commit comments

Comments
 (0)