@travetto/test 3.4.1 → 3.4.2
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.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Declarative test framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unit-testing",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@travetto/yaml": "^3.4.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@travetto/cli": "^3.4.
|
|
38
|
-
"@travetto/transformer": "^3.4.
|
|
37
|
+
"@travetto/cli": "^3.4.6",
|
|
38
|
+
"@travetto/transformer": "^3.4.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@travetto/transformer": {
|
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 { defineEnv } 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,9 +22,9 @@ export class TestCommand implements CliCommandShape {
|
|
|
22
22
|
/** Test run mode */
|
|
23
23
|
mode: TestMode = 'standard';
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
preMain(): void {
|
|
26
26
|
EventEmitter.defaultMaxListeners = 1000;
|
|
27
|
-
|
|
27
|
+
defineEnv({ envName: 'test' });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
isFirstFile(first: string): Promise<boolean> {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { defineEnv, 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
|
-
|
|
9
|
+
preMain(): void {
|
|
10
10
|
EventEmitter.defaultMaxListeners = 1000;
|
|
11
11
|
process.env.FORCE_COLOR = '0';
|
|
12
|
-
|
|
12
|
+
defineEnv({ envName: 'test' });
|
|
13
13
|
}
|
|
14
14
|
|
|
15
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 { defineEnv } from '@travetto/base';
|
|
4
4
|
|
|
5
5
|
import { SuiteRegistry } from '../src/registry/suite';
|
|
6
6
|
import { RunnerUtil } from '../src/execute/util';
|
|
@@ -8,8 +8,8 @@ import { RunnerUtil } from '../src/execute/util';
|
|
|
8
8
|
@CliCommand({ hidden: true })
|
|
9
9
|
export class TestCountCommand {
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
preMain(): void {
|
|
12
|
+
defineEnv({ debug: false, envName: 'test' });
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async main(patterns: string[]) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineEnv } from '@travetto/base';
|
|
2
2
|
import { CliCommand } from '@travetto/cli';
|
|
3
3
|
|
|
4
4
|
import { runTests } from './bin/run';
|
|
@@ -10,8 +10,8 @@ export class TestDirectCommand {
|
|
|
10
10
|
|
|
11
11
|
format: TestFormat = 'tap';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
preMain(): void {
|
|
14
|
+
defineEnv({ envName: 'test' });
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
main(file: string, args: string[]): Promise<void> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineEnv } from '@travetto/base';
|
|
2
2
|
import { CliCommand, CliUtil } from '@travetto/cli';
|
|
3
3
|
|
|
4
4
|
import { TestFormat } from './bin/types';
|
|
@@ -12,8 +12,8 @@ export class TestWatcherCommand {
|
|
|
12
12
|
format: TestFormat = 'tap';
|
|
13
13
|
mode: 'all' | 'change' = 'all';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
preMain(): void {
|
|
16
|
+
defineEnv({ envName: 'test', dynamic: true });
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
async main(): Promise<void> {
|