@travetto/test 3.4.0-rc.7 → 3.4.0
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/test",
|
|
3
|
-
"version": "3.4.0
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Declarative test framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unit-testing",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"directory": "module/test"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/base": "^3.4.0
|
|
31
|
-
"@travetto/registry": "^3.4.0
|
|
32
|
-
"@travetto/terminal": "^3.4.0
|
|
33
|
-
"@travetto/worker": "^3.4.0
|
|
34
|
-
"@travetto/yaml": "^3.4.0
|
|
30
|
+
"@travetto/base": "^3.4.0",
|
|
31
|
+
"@travetto/registry": "^3.4.0",
|
|
32
|
+
"@travetto/terminal": "^3.4.0",
|
|
33
|
+
"@travetto/worker": "^3.4.0",
|
|
34
|
+
"@travetto/yaml": "^3.4.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@travetto/cli": "^3.4.0
|
|
38
|
-
"@travetto/transformer": "^3.4.0
|
|
37
|
+
"@travetto/cli": "^3.4.0",
|
|
38
|
+
"@travetto/transformer": "^3.4.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@travetto/transformer": {
|
package/src/execute/util.ts
CHANGED
|
@@ -70,9 +70,6 @@ export class RunnerUtil {
|
|
|
70
70
|
* Determine if we should invoke the debugger
|
|
71
71
|
*/
|
|
72
72
|
static get tryDebugger(): boolean {
|
|
73
|
-
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
73
|
+
return process.env.TRV_TEST_BREAK_ENTRY === '1';
|
|
77
74
|
}
|
|
78
75
|
}
|
package/src/fixture.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FileLoader } from '@travetto/base';
|
|
2
2
|
|
|
3
|
-
export class TestFixtures extends
|
|
4
|
-
constructor(
|
|
5
|
-
super(
|
|
3
|
+
export class TestFixtures extends FileLoader {
|
|
4
|
+
constructor(modules: string[] = []) {
|
|
5
|
+
super(['@#test/fixtures', ...['@', ...modules.flat()].map(x => `${x}#support/fixtures`)]);
|
|
6
6
|
}
|
|
7
7
|
}
|
package/support/cli.test.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EventEmitter } from 'events';
|
|
|
2
2
|
import fs from 'fs/promises';
|
|
3
3
|
|
|
4
4
|
import { path } from '@travetto/manifest';
|
|
5
|
-
import {
|
|
5
|
+
import { EnvInit } from '@travetto/base';
|
|
6
6
|
import { CliCommandShape, CliCommand, CliValidationError } from '@travetto/cli';
|
|
7
7
|
import { WorkPool } from '@travetto/worker';
|
|
8
8
|
import { Max, Min } from '@travetto/schema';
|
|
@@ -22,7 +22,7 @@ export class TestCommand implements CliCommandShape {
|
|
|
22
22
|
/** Test run mode */
|
|
23
23
|
mode: TestMode = 'standard';
|
|
24
24
|
|
|
25
|
-
envInit():
|
|
25
|
+
envInit(): EnvInit {
|
|
26
26
|
EventEmitter.defaultMaxListeners = 1000;
|
|
27
27
|
return { envName: 'test' };
|
|
28
28
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { EnvInit, ShutdownManager } from '@travetto/base';
|
|
4
4
|
import { CliCommand } from '@travetto/cli';
|
|
5
5
|
|
|
6
6
|
/** Test child worker target */
|
|
7
7
|
@CliCommand({ hidden: true })
|
|
8
8
|
export class TestChildWorkerCommand {
|
|
9
|
-
envInit():
|
|
9
|
+
envInit(): EnvInit {
|
|
10
10
|
EventEmitter.defaultMaxListeners = 1000;
|
|
11
|
-
|
|
11
|
+
process.env.FORCE_COLOR = '0';
|
|
12
|
+
return { envName: 'test' };
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
async main(): Promise<void> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CliCommand } from '@travetto/cli';
|
|
2
2
|
import { RootIndex } from '@travetto/manifest';
|
|
3
|
-
import {
|
|
3
|
+
import { EnvInit } from '@travetto/base';
|
|
4
4
|
|
|
5
5
|
import { SuiteRegistry } from '../src/registry/suite';
|
|
6
6
|
import { RunnerUtil } from '../src/execute/util';
|
|
@@ -8,7 +8,7 @@ import { RunnerUtil } from '../src/execute/util';
|
|
|
8
8
|
@CliCommand({ hidden: true })
|
|
9
9
|
export class TestCountCommand {
|
|
10
10
|
|
|
11
|
-
envInit():
|
|
11
|
+
envInit(): EnvInit {
|
|
12
12
|
return { debug: false, envName: 'test' };
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnvInit } from '@travetto/base';
|
|
2
2
|
import { CliCommand } from '@travetto/cli';
|
|
3
3
|
|
|
4
4
|
import { runTests } from './bin/run';
|
|
@@ -10,7 +10,7 @@ export class TestDirectCommand {
|
|
|
10
10
|
|
|
11
11
|
format: TestFormat = 'tap';
|
|
12
12
|
|
|
13
|
-
envInit():
|
|
13
|
+
envInit(): EnvInit {
|
|
14
14
|
return { envName: 'test' };
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnvInit } from '@travetto/base';
|
|
2
2
|
import { CliCommand, CliUtil } from '@travetto/cli';
|
|
3
3
|
|
|
4
4
|
import { TestFormat } from './bin/types';
|
|
@@ -12,7 +12,7 @@ export class TestWatcherCommand {
|
|
|
12
12
|
format: TestFormat = 'tap';
|
|
13
13
|
mode: 'all' | 'change' = 'all';
|
|
14
14
|
|
|
15
|
-
envInit():
|
|
15
|
+
envInit(): EnvInit {
|
|
16
16
|
return { envName: 'test', dynamic: true };
|
|
17
17
|
}
|
|
18
18
|
|