Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug trueforge-core orchestration (current file)",
"cwd": "${workspaceFolder}/packages/trueforge-core",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["test:orchestration", "--", "--runInBand", "--testTimeout", "0", "${file}"],
"console": "integratedTerminal",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"sourceMaps": true,
"resolveSourceMapLocations": ["${workspaceFolder}/packages/trueforge-core/**", "!**/node_modules/**"]
}
]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"test:frontend": "pnpm --filter frontend test",
"test:chart-version": "bash tests/scripts/resolve-chart-version.test.sh",
"test:trueforge-core": "pnpm --filter @truefoundry/trueforge-core test",
"test:trueforge-core:orchestration": "pnpm --filter @truefoundry/trueforge-core test:orchestration",
"test:trueforge-core:orchestration:debug": "pnpm --filter @truefoundry/trueforge-core test:orchestration:debug",
"test:trueforge": "pnpm --filter @truefoundry/trueforge test",
"test:local-sandbox:contract": "pnpm --filter @truefoundry/trueforge test:local-sandbox:contract",
"smoke:local-sandbox": "pnpm --filter @truefoundry/trueforge smoke:local-sandbox",
Expand Down
3 changes: 2 additions & 1 deletion packages/trueforge-core/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ module.exports = {
roots: ['<rootDir>/tests'],
testMatch: ['**/tests/**/*.test.ts'],
// Compile-time suites are enforced by `tsc --noEmit`, not the Jest runner.
testPathIgnorePatterns: ['\\.compile\\.test\\.ts$'],
// Orchestration tests live under tests/orchestration and are run via jest.orchestration.config.cjs.
testPathIgnorePatterns: ['\\.compile\\.test\\.ts$', '<rootDir>/tests/orchestration/'],
};
37 changes: 37 additions & 0 deletions packages/trueforge-core/jest.orchestration.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': [
'@swc/jest',
{
jsc: {
parser: { syntax: 'typescript', decorators: true },
target: 'es2022',
},
module: { type: 'commonjs' },
sourceMaps: 'inline',
},
],
'^.+\\.js$': [
'@swc/jest',
{
jsc: {
parser: { syntax: 'ecmascript' },
target: 'es2022',
},
module: { type: 'commonjs' },
sourceMaps: 'inline',
},
],
},
transformIgnorePatterns: [],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
testTimeout: 60_000,
maxWorkers: 1,
roots: ['<rootDir>/tests/orchestration'],
testMatch: ['<rootDir>/tests/orchestration/**/*.test.ts'],
};
4 changes: 3 additions & 1 deletion packages/trueforge-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
"build:pkg": "node scripts/write-dist-package-json.mjs",
"build:check": "node scripts/check-dist.mjs",
"typecheck": "pnpm run build:gen && tsc --noEmit",
"test": "pnpm run build:gen && jest --config jest.config.cjs",
"test": "pnpm run build:gen && jest --config jest.config.cjs && jest --config jest.orchestration.config.cjs",
"test:orchestration": "pnpm run build:gen && jest --config jest.orchestration.config.cjs",
"test:orchestration:debug": "pnpm run build:gen && node --inspect-brk ./node_modules/jest/bin/jest.js --config jest.orchestration.config.cjs --runInBand --testTimeout 0",
"pack:dry": "pnpm pack --dry-run"
},
"dependencies": {
Expand Down
Loading