Skip to content

Commit be974c9

Browse files
committed
test(router-store): migrate tests to vitest
1 parent d63dd34 commit be974c9

File tree

9 files changed

+931
-891
lines changed

9 files changed

+931
-891
lines changed

modules/router-store/migrations/14_0_0/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { waitForAsync } from '@angular/core/testing';
99

1010
describe('Router Store Migration 14_0_0', () => {
1111
let appTree: UnitTestTree;
12-
const collectionPath = path.join(__dirname, '../migration.json');
12+
const collectionPath = path.join(
13+
process.cwd(),
14+
'dist/modules/router-store/migrations/migration.json'
15+
);
1316
const pkgName = 'router-store';
1417

1518
beforeEach(() => {

modules/router-store/migrations/15_2_0/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { waitForAsync } from '@angular/core/testing';
99

1010
describe('Router Store Migration 15_2_0', () => {
1111
let appTree: UnitTestTree;
12-
const collectionPath = path.join(__dirname, '../migration.json');
12+
const collectionPath = path.join(
13+
process.cwd(),
14+
'dist/modules/router-store/migrations/migration.json'
15+
);
1316
const pkgName = 'router-store';
1417

1518
beforeEach(() => {

modules/router-store/migrations/6_0_0/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import {
1313
versionPrefixes,
1414
} from '@ngrx/schematics-core/testing/update';
1515

16-
const collectionPath = path.join(__dirname, '../migration.json');
16+
const collectionPath = path.join(
17+
process.cwd(),
18+
'dist/modules/router-store/migrations/migration.json'
19+
);
1720

1821
describe('Router Store Migration 6_0_0', () => {
1922
let appTree;

modules/router-store/migrations/8_0_0/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { createPackageJson } from '@ngrx/schematics-core/testing/create-package'
88

99
describe('Router Store Migration 8_0_0', () => {
1010
let appTree: UnitTestTree;
11-
const collectionPath = path.join(__dirname, '../migration.json');
11+
const collectionPath = path.join(
12+
process.cwd(),
13+
'dist/modules/router-store/migrations/migration.json'
14+
);
1215
const pkgName = 'router-store';
1316

1417
beforeEach(() => {

modules/router-store/migrations/9_0_0/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { createPackageJson } from '@ngrx/schematics-core/testing/create-package'
88

99
describe('Router Store Migration 9_0_0', () => {
1010
let appTree: UnitTestTree;
11-
const collectionPath = path.join(__dirname, '../migration.json');
11+
const collectionPath = path.join(
12+
process.cwd(),
13+
'dist/modules/router-store/migrations/migration.json'
14+
);
1215
const pkgName = 'router-store';
1316

1417
beforeEach(() => {

modules/router-store/schematics/ng-add/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import {
1212
describe('Router Store ng-add Schematic', () => {
1313
const schematicRunner = new SchematicTestRunner(
1414
'@ngrx/router-store',
15-
path.join(__dirname, '../collection.json')
15+
path.join(
16+
process.cwd(),
17+
'dist/modules/router-store/schematics/collection.json'
18+
)
1619
);
1720
const defaultOptions: RouterStoreOptions = {
1821
skipPackageJson: false,

0 commit comments

Comments
 (0)