tape-six-proc 1.2.0 → 1.2.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/README.md +2 -0
- package/package.json +9 -6
- package/src/TestWorker.js +14 -10
- package/tests/manual/test-assert.js +10 -0
- package/tests/manual/test-chai.js +16 -0
- package/tests/test-assert.js +11 -0
- package/tests/test-chai.js +20 -0
- package/wiki/Release-notes.md +2 -0
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ has the same usage as `tape6`.
|
|
|
22
22
|
|
|
23
23
|
The most recent releases:
|
|
24
24
|
|
|
25
|
+
- 1.2.2 _Synchronized the implementation with `tape-six` 1.7.0._
|
|
26
|
+
- 1.2.1 _Synchronized the implementation with `tape-six` 1.5.1._
|
|
25
27
|
- 1.2.0 _Updated dependencies and synchronized the implementation with `tape-six` 1.5.0._
|
|
26
28
|
- 1.1.6 _Updated dependencies._
|
|
27
29
|
- 1.1.5 _Updated dependencies._
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tape-six-proc",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Helper for TAP the test harness for the modern JavaScript (ES6) to run tests in separate processes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"lint": "prettier --check .",
|
|
11
11
|
"lint:fix": "prettier --write .",
|
|
12
|
-
"test": "node ./bin/tape6-proc.js",
|
|
13
|
-
"test:bun": "bun run ./bin/tape6-proc.js",
|
|
14
|
-
"test:deno": "deno run -A ./bin/tape6-proc.js -r --allow-read -r --allow-env"
|
|
12
|
+
"test": "node ./bin/tape6-proc.js --flags FO",
|
|
13
|
+
"test:bun": "bun run ./bin/tape6-proc.js --flags FO",
|
|
14
|
+
"test:deno": "deno run -A ./bin/tape6-proc.js -r --allow-read -r --allow-env --flags FO"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"tap",
|
|
@@ -32,12 +32,15 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/uhop/tape-six-proc#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"dollar-shell": "^1.1.
|
|
36
|
-
"tape-six": "^1.
|
|
35
|
+
"dollar-shell": "^1.1.8",
|
|
36
|
+
"tape-six": "^1.7.0"
|
|
37
37
|
},
|
|
38
38
|
"tape6": {
|
|
39
39
|
"tests": [
|
|
40
40
|
"/tests/test-*.*js"
|
|
41
41
|
]
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"chai": "^6.2.2"
|
|
42
45
|
}
|
|
43
46
|
}
|
package/src/TestWorker.js
CHANGED
|
@@ -8,7 +8,7 @@ import {spawn, currentExecPath, runFileArgs} from 'dollar-shell';
|
|
|
8
8
|
|
|
9
9
|
import {isStopTest} from 'tape-six/State.js';
|
|
10
10
|
import EventServer from 'tape-six/utils/EventServer.js';
|
|
11
|
-
import
|
|
11
|
+
import makeDeferred from 'tape-six/utils/makeDeferred.js';
|
|
12
12
|
|
|
13
13
|
import lines from './streams/lines.js';
|
|
14
14
|
import parse from './streams/parse-prefixed-jsonl.js';
|
|
@@ -44,7 +44,7 @@ export default class TestWorker extends EventServer {
|
|
|
44
44
|
);
|
|
45
45
|
this.idToWorker[id] = worker;
|
|
46
46
|
const self = this;
|
|
47
|
-
const stdoutDeferred =
|
|
47
|
+
const stdoutDeferred = makeDeferred();
|
|
48
48
|
worker.stdout
|
|
49
49
|
.pipeThrough(new TextDecoderStream())
|
|
50
50
|
.pipeThrough(lines())
|
|
@@ -66,7 +66,7 @@ export default class TestWorker extends EventServer {
|
|
|
66
66
|
}
|
|
67
67
|
})
|
|
68
68
|
);
|
|
69
|
-
const stderrDeferred =
|
|
69
|
+
const stderrDeferred = makeDeferred();
|
|
70
70
|
worker.stderr
|
|
71
71
|
.pipeThrough(new TextDecoderStream())
|
|
72
72
|
.pipeThrough(lines())
|
|
@@ -91,13 +91,17 @@ export default class TestWorker extends EventServer {
|
|
|
91
91
|
reason.push(`signal: ${worker.signalCode}`);
|
|
92
92
|
}
|
|
93
93
|
if (reason.length) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
try {
|
|
95
|
+
self.report(id, {
|
|
96
|
+
name: 'process has failed, ' + reason.join(', '),
|
|
97
|
+
test: 0,
|
|
98
|
+
marker: new Error(),
|
|
99
|
+
operator: 'error',
|
|
100
|
+
fail: true
|
|
101
|
+
});
|
|
102
|
+
} catch (error) {
|
|
103
|
+
if (!isStopTest(error)) throw error;
|
|
104
|
+
}
|
|
101
105
|
self.report(id, {type: 'terminated', test: 0, name: 'FILE: /' + fileName});
|
|
102
106
|
}
|
|
103
107
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import assert from 'node:assert';
|
|
2
|
+
import test from 'tape-six';
|
|
3
|
+
|
|
4
|
+
test('Using standard assert', t => {
|
|
5
|
+
t.pass('Pass #1');
|
|
6
|
+
// assert.strict.deepEqual([1], [2], '1 should be equal to 2!');
|
|
7
|
+
assert.strict.equal(1, 1);
|
|
8
|
+
assert.strict.deepEqual([1], [2]);
|
|
9
|
+
t.pass('Pass #2');
|
|
10
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {expect, assert} from 'chai';
|
|
2
|
+
import test from 'tape-six';
|
|
3
|
+
|
|
4
|
+
test('Using Chai expect', t => {
|
|
5
|
+
t.pass('Pass #1');
|
|
6
|
+
expect([1]).to.deep.equal([1]);
|
|
7
|
+
expect([1]).to.deep.equal([2]);
|
|
8
|
+
t.pass('Pass #2');
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Using Chai assert', t => {
|
|
12
|
+
t.pass('Pass #1');
|
|
13
|
+
assert.deepEqual([1], [1]);
|
|
14
|
+
assert.deepEqual([1], [2], '1 should be equal to 2!');
|
|
15
|
+
t.pass('Pass #2');
|
|
16
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {expect, assert} from 'chai';
|
|
2
|
+
import test from 'tape-six';
|
|
3
|
+
|
|
4
|
+
test('Using Chai expect', t => {
|
|
5
|
+
t.pass('Pass #1');
|
|
6
|
+
expect([1]).to.deep.equal([1]);
|
|
7
|
+
t.throws(() => {
|
|
8
|
+
expect([1]).to.deep.equal([2]);
|
|
9
|
+
});
|
|
10
|
+
t.pass('Pass #2');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('Using Chai assert', t => {
|
|
14
|
+
t.pass('Pass #1');
|
|
15
|
+
assert.deepEqual([1], [1]);
|
|
16
|
+
t.throws(() => {
|
|
17
|
+
assert.deepEqual([1], [2], '1 should be equal to 2!');
|
|
18
|
+
});
|
|
19
|
+
t.pass('Pass #2');
|
|
20
|
+
});
|
package/wiki/Release-notes.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# The current version: 1.x
|
|
2
2
|
|
|
3
|
+
- 1.2.2 _Synchronized the implementation with `tape-six` 1.7.0._
|
|
4
|
+
- 1.2.1 _Synchronized the implementation with `tape-six` 1.5.1._
|
|
3
5
|
- 1.2.0 _Updated dependencies and synchronized the implementation with `tape-six` 1.5.0._
|
|
4
6
|
- 1.1.6 _Updated dependencies._
|
|
5
7
|
- 1.1.5 _Updated dependencies._
|