@signal24/dk-server-foundation 26.214.2145 → 26.215.315
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -40,31 +40,18 @@ async function main() {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
// Collect test files
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
const testFiles = [];
|
|
44
|
+
for (const f of fileArgs) {
|
|
45
|
+
const distPath = f.startsWith('dist/') ? f : f.replace(/^tests\//, 'dist/tests/').replace(/\.ts$/, '.js');
|
|
46
|
+
if (distPath.endsWith('/') || !distPath.includes('.')) {
|
|
47
|
+
testFiles.push(...(0, fs_1.globSync)((0, path_1.join)(distPath, '**/*.spec.js')));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
testFiles.push(distPath);
|
|
51
|
+
}
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
testFiles = [];
|
|
55
|
-
const findSpecFiles = __assignType((dir) => {
|
|
56
|
-
const entries = (0, fs_1.readdirSync)(dir, { withFileTypes: true });
|
|
57
|
-
for (const entry of entries) {
|
|
58
|
-
const fullPath = (0, path_1.join)(dir, entry.name);
|
|
59
|
-
if (entry.isDirectory()) {
|
|
60
|
-
findSpecFiles(fullPath);
|
|
61
|
-
}
|
|
62
|
-
else if (entry.name.endsWith('.spec.js')) {
|
|
63
|
-
testFiles.push(fullPath);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}, ['dir', '', 'P&2!"/"']);
|
|
67
|
-
findSpecFiles((0, path_1.join)(distDir, 'tests'));
|
|
53
|
+
if (testFiles.length === 0) {
|
|
54
|
+
testFiles.push(...(0, fs_1.globSync)((0, path_1.join)(distDir, 'tests', '**/*.spec.js')));
|
|
68
55
|
}
|
|
69
56
|
// Run node --test
|
|
70
57
|
// Note: --test-timeout applies to describe() suites on Node 24+, so this must be high
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dksf-test.js","sourceRoot":"","sources":["../../../src/cli/dksf-test.ts"],"names":[],"mappings":";;;;;;;AAEA,0DAA0D;AAE1D,iDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"dksf-test.js","sourceRoot":"","sources":["../../../src/cli/dksf-test.ts"],"names":[],"mappings":";;;;;;;AAEA,0DAA0D;AAE1D,iDAAsC;AACtC,2BAA8B;AAC9B,+BAAqC;AAErC,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;AACvB,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,OAAO,GAAG,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC;AAEhC,KAAK,UAAU,IAAI;IACf,gCAAgC;IAChC,IAAI,QAA2C,CAAC;IAChD,IAAI,CAAC;QACD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;QAC7E,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;YACpB,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;YACvB,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;QACpC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACL,kCAAkC;IACtC,CAAC;IAED,kBAAkB;IAClB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,Q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AAE,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE;KACrC,CACJ,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAU,OAAO,kBAAX,IAAI,OAAO,cAAgB,OAAO,CAAC,EAAE;QACxD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC,8BAAC,CAAA,CAAC;IAEH,eAAe;IACf,IAAI,QAAQ,EAAE,CAAC;QACX,MAAM,QAAQ,EAAE,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;AAChC,CAAC;;AAED,IAAI,EAAE,CAAC,KAAK,cAAC,GAAG,CAAC,EAAE;IACf,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,0BAAC,CAAC"}
|
package/docs/content/cli.md
CHANGED
|
@@ -73,6 +73,9 @@ The `dksf-test` runner will automatically load `dist/tests/shared/globalSetup.js
|
|
|
73
73
|
# Run a single test file (source path is mapped to dist automatically)
|
|
74
74
|
yarn test tests/my-feature.spec.ts
|
|
75
75
|
|
|
76
|
+
# Run all tests in a directory
|
|
77
|
+
yarn test tests/integration/
|
|
78
|
+
|
|
76
79
|
# Pass node flags
|
|
77
80
|
yarn test --test-name-pattern="my test"
|
|
78
81
|
```
|
package/package.json
CHANGED
package/src/cli/dksf-test.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
4
4
|
|
|
5
5
|
import { spawn } from 'child_process';
|
|
6
|
-
import {
|
|
6
|
+
import { globSync } from 'fs';
|
|
7
7
|
import { join, resolve } from 'path';
|
|
8
8
|
|
|
9
9
|
process.env.TZ = 'UTC';
|
|
@@ -40,28 +40,17 @@ async function main() {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// Collect test files
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const entries = readdirSync(dir, { withFileTypes: true });
|
|
55
|
-
for (const entry of entries) {
|
|
56
|
-
const fullPath = join(dir, entry.name);
|
|
57
|
-
if (entry.isDirectory()) {
|
|
58
|
-
findSpecFiles(fullPath);
|
|
59
|
-
} else if (entry.name.endsWith('.spec.js')) {
|
|
60
|
-
testFiles.push(fullPath);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
findSpecFiles(join(distDir, 'tests'));
|
|
43
|
+
const testFiles: string[] = [];
|
|
44
|
+
for (const f of fileArgs) {
|
|
45
|
+
const distPath = f.startsWith('dist/') ? f : f.replace(/^tests\//, 'dist/tests/').replace(/\.ts$/, '.js');
|
|
46
|
+
if (distPath.endsWith('/') || !distPath.includes('.')) {
|
|
47
|
+
testFiles.push(...globSync(join(distPath, '**/*.spec.js')));
|
|
48
|
+
} else {
|
|
49
|
+
testFiles.push(distPath);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (testFiles.length === 0) {
|
|
53
|
+
testFiles.push(...globSync(join(distDir, 'tests', '**/*.spec.js')));
|
|
65
54
|
}
|
|
66
55
|
|
|
67
56
|
// Run node --test
|