Skip to content

Commit 76ee9ca

Browse files
authored
Merge pull request #345 from objectstack-ai/copilot/check-build-status-in-action
2 parents 3d2752c + dc8fb16 commit 76ee9ca

4 files changed

Lines changed: 56 additions & 0 deletions

File tree

packages/foundation/plugin-formula/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
testMatch: ['**/test/**/*.test.ts'],
1313
moduleNameMapper: {
1414
'^@objectql/(.*)$': '<rootDir>/../$1/src',
15+
'^@objectstack/core$': '<rootDir>/test/__mocks__/@objectstack/core.ts',
1516
},
1617
transform: {
1718
'^.+\\.(t|j)sx?$': ['ts-jest', {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* ObjectQL
3+
* Copyright (c) 2026-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/**
10+
* Mock for @objectstack/core to enable Jest testing
11+
*
12+
* Since @objectstack/core@0.9.2 uses ES modules with import.meta,
13+
* which Jest doesn't support well, we provide this mock for testing.
14+
*/
15+
16+
export const createLogger = jest.fn(() => ({
17+
trace: jest.fn(),
18+
debug: jest.fn(),
19+
info: jest.fn(),
20+
warn: jest.fn(),
21+
error: jest.fn(),
22+
fatal: jest.fn(),
23+
}));
24+
25+
export const ObjectKernel = jest.fn();
26+
export const LiteKernel = jest.fn();
27+
export const createApiRegistryPlugin = jest.fn();

packages/foundation/plugin-validator/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
testMatch: ['**/test/**/*.test.ts'],
1313
moduleNameMapper: {
1414
'^@objectql/(.*)$': '<rootDir>/../$1/src',
15+
'^@objectstack/core$': '<rootDir>/test/__mocks__/@objectstack/core.ts',
1516
},
1617
transform: {
1718
'^.+\\.(t|j)sx?$': ['ts-jest', {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* ObjectQL
3+
* Copyright (c) 2026-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/**
10+
* Mock for @objectstack/core to enable Jest testing
11+
*
12+
* Since @objectstack/core@0.9.2 uses ES modules with import.meta,
13+
* which Jest doesn't support well, we provide this mock for testing.
14+
*/
15+
16+
export const createLogger = jest.fn(() => ({
17+
trace: jest.fn(),
18+
debug: jest.fn(),
19+
info: jest.fn(),
20+
warn: jest.fn(),
21+
error: jest.fn(),
22+
fatal: jest.fn(),
23+
}));
24+
25+
export const ObjectKernel = jest.fn();
26+
export const LiteKernel = jest.fn();
27+
export const createApiRegistryPlugin = jest.fn();

0 commit comments

Comments
 (0)