Skip to content

Commit 4be9927

Browse files
committed
refactor: add test:watch script to package.json and update Jest module name mappings
1 parent 25b8a60 commit 4be9927

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

packages/protocols/graphql/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
},
1414
"scripts": {
1515
"build": "tsc",
16-
"test": "vitest run"
16+
"test": "vitest run",
17+
"test:watch": "vitest"
1718
},
1819
"dependencies": {
1920
"@objectstack/runtime": "workspace:*",

packages/protocols/json-rpc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
},
1414
"scripts": {
1515
"build": "tsc",
16-
"test": "vitest run"
16+
"test": "vitest run",
17+
"test:watch": "vitest"
1718
},
1819
"dependencies": {
1920
"@objectstack/runtime": "workspace:*",

packages/protocols/odata-v4/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
},
1414
"scripts": {
1515
"build": "tsc",
16-
"test": "vitest run"
16+
"test": "vitest run",
17+
"test:watch": "vitest"
1718
},
1819
"dependencies": {
1920
"@objectstack/runtime": "workspace:*",

packages/runtime/server/jest.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ module.exports = {
1111
testEnvironment: 'node',
1212
testMatch: ['**/*.test.ts'],
1313
moduleNameMapper: {
14+
'^@objectstack/runtime$': '<rootDir>/../../../../spec/packages/runtime/src',
15+
'^@objectstack/core$': '<rootDir>/../../../../spec/packages/core/src',
16+
'^@objectstack/objectql$': '<rootDir>/../../../../spec/packages/objectql/src',
1417
'^@objectql/types$': '<rootDir>/../../foundation/types/src',
1518
'^@objectql/core$': '<rootDir>/../../foundation/core/src',
1619
'^@objectql/driver-sql$': '<rootDir>/../../drivers/sql/src',
17-
'^@objectql/driver-mongo$': '<rootDir>/../../drivers/mongo/src'
20+
'^@objectql/driver-mongo$': '<rootDir>/../../drivers/mongo/src',
21+
'^(.*)\\.js$': '$1',
1822
}
1923
};

0 commit comments

Comments
 (0)