Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn committed Sep 11, 2024
1 parent 243cbde commit d7881b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions projects/angular-redux/schematics/ng-add/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
});
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-redux/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d7881b3

Please sign in to comment.