@travetto/test 7.0.6 → 7.1.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/README.md CHANGED
@@ -82,7 +82,7 @@ import * as Δdebug from "@travetto/runtime/src/debug.js";
82
82
  import * as Δcheck from "@travetto/test/src/assert/check.js";
83
83
  import * as Δfunction from "@travetto/runtime/src/function.js";
84
84
  import * as Δschema from "@travetto/schema/src/decorator/schema.js";
85
- var Δm_1 = ["@travetto/test", "doc/assert-example.ts"];
85
+ const Δm_1 = ["@travetto/test", "doc/assert-example.ts"];
86
86
  import assert from 'node:assert';
87
87
  import { Suite, Test } from '@travetto/test';
88
88
  let SimpleTest = class SimpleTest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/test",
3
- "version": "7.0.6",
3
+ "version": "7.1.0",
4
4
  "type": "module",
5
5
  "description": "Declarative test framework",
6
6
  "keywords": [
@@ -28,15 +28,15 @@
28
28
  "directory": "module/test"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/registry": "^7.0.6",
32
- "@travetto/runtime": "^7.0.5",
33
- "@travetto/terminal": "^7.0.5",
34
- "@travetto/worker": "^7.0.5",
31
+ "@travetto/registry": "^7.1.0",
32
+ "@travetto/runtime": "^7.1.0",
33
+ "@travetto/terminal": "^7.1.0",
34
+ "@travetto/worker": "^7.1.0",
35
35
  "yaml": "^2.8.2"
36
36
  },
37
37
  "peerDependencies": {
38
- "@travetto/cli": "^7.0.7",
39
- "@travetto/transformer": "^7.0.5"
38
+ "@travetto/cli": "^7.1.0",
39
+ "@travetto/transformer": "^7.1.0"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "@travetto/transformer": {
@@ -4,7 +4,7 @@ import readline from 'node:readline/promises';
4
4
  import path from 'node:path';
5
5
  import { spawn } from 'node:child_process';
6
6
 
7
- import { Env, ExecUtil, ShutdownManager, Util, RuntimeIndex, Runtime, TimeUtil, JSONUtil } from '@travetto/runtime';
7
+ import { Env, ExecUtil, Util, RuntimeIndex, Runtime, TimeUtil, JSONUtil } from '@travetto/runtime';
8
8
  import { WorkPool } from '@travetto/worker';
9
9
  import { Registry } from '@travetto/registry';
10
10
 
@@ -27,12 +27,6 @@ type RunState = {
27
27
  * Test Utilities for Running
28
28
  */
29
29
  export class RunUtil {
30
- /**
31
- * Add 50 ms to the shutdown to allow for buffers to output properly
32
- */
33
- static registerCleanup(scope: string): void {
34
- ShutdownManager.onGracefulShutdown(() => Util.blockingTimeout(50), `test.${scope}.bufferOutput`);
35
- }
36
30
 
37
31
  /**
38
32
  * Determine if a given file path is a valid test file
@@ -42,8 +42,6 @@ export class TestChildWorker extends IpcChannel<TestRun> {
42
42
  ConsoleManager.set({ log: () => { } });
43
43
  }
44
44
 
45
- RunUtil.registerCleanup('worker');
46
-
47
45
  // Listen for inbound requests
48
46
  this.on('*', event => this.onCommand(event));
49
47
 
@@ -12,8 +12,6 @@ import type { TestRunInput } from '../../src/model/test.ts';
12
12
  export async function runTests(state: TestConsumerConfig, input: TestRunInput): Promise<void> {
13
13
  const { RunUtil } = await import('../../src/execute/run.ts');
14
14
 
15
- RunUtil.registerCleanup('runner');
16
-
17
15
  try {
18
16
  const result = await RunUtil.runTests(state, input);
19
17
  process.exitCode = result ? 0 : 1;
@@ -33,10 +33,10 @@ export class TestCommand implements CliCommandShape {
33
33
  preMain(): void {
34
34
  EventEmitter.defaultMaxListeners = 1000;
35
35
  Env.TRV_ROLE.set('test');
36
- Env.TRV_ENV.set('test');
37
36
  Env.DEBUG.set(false);
38
37
  Env.TRV_LOG_PLAIN.set(true);
39
38
  Env.TRV_LOG_TIME.clear();
39
+ Env.TRV_SHUTDOWN_STDOUT_WAIT.set(50);
40
40
  }
41
41
 
42
42
  async preValidate(): Promise<void> {
@@ -11,11 +11,11 @@ export class TestChildWorkerCommand {
11
11
  preMain(): void {
12
12
  EventEmitter.defaultMaxListeners = 1000;
13
13
  Env.TRV_ROLE.set('test');
14
- Env.TRV_ENV.set('test');
15
14
  Env.DEBUG.set(false);
16
15
  Env.FORCE_COLOR.set(false);
17
16
  Env.TRV_LOG_PLAIN.set(true);
18
17
  Env.TRV_LOG_TIME.clear();
18
+ Env.TRV_SHUTDOWN_STDOUT_WAIT.set(50);
19
19
  }
20
20
 
21
21
  async main(): Promise<void> {
@@ -24,7 +24,6 @@ export class TestDiffCommand {
24
24
 
25
25
  preMain(): void {
26
26
  Env.TRV_ROLE.set('test');
27
- Env.TRV_ENV.set('test');
28
27
  Env.TRV_LOG_PLAIN.set(true);
29
28
  Env.TRV_LOG_TIME.clear();
30
29
  }
@@ -23,7 +23,6 @@ export class TestDirectCommand {
23
23
 
24
24
  preMain(): void {
25
25
  Env.TRV_ROLE.set('test');
26
- Env.TRV_ENV.set('test');
27
26
  Env.TRV_LOG_PLAIN.set(true);
28
27
  Env.TRV_LOG_TIME.clear();
29
28
  }