9
9
// Requirements
10
10
// ------------------------------------------------------------------------------
11
11
12
- const assert = require ( 'assert' ) . strict
12
+ const { test, describe, before, after, beforeEach } = require ( 'node:test' )
13
+ const assert = require ( 'node:assert/strict' )
13
14
const nodeApi = require ( '../lib' )
14
15
const BufferStream = require ( './lib/buffer-stream' )
15
16
const util = require ( './lib/util' )
@@ -48,15 +49,15 @@ describe('[aggregated-output] npm-run-all', () => {
48
49
stdout = new BufferStream ( )
49
50
} )
50
51
51
- it ( 'Node API with parallel' , async ( ) => {
52
+ test ( 'Node API with parallel' , async ( ) => {
52
53
await nodeApi (
53
54
[ 'test-task:delayed first 5000' , 'test-task:delayed second 1000' , 'test-task:delayed third 3000' ] ,
54
55
{ stdout, parallel : true , silent : true , aggregateOutput : true }
55
56
)
56
57
assert . equal ( stdout . value , EXPECTED_PARALLELIZED_TEXT )
57
58
} )
58
59
59
- it ( 'Node API without parallel should fail' , async ( ) => {
60
+ test ( 'Node API without parallel should fail' , async ( ) => {
60
61
try {
61
62
await nodeApi (
62
63
[ 'test-task:delayed first 5000' , 'test-task:delayed second 1000' , 'test-task:delayed third 3000' ] ,
@@ -68,15 +69,15 @@ describe('[aggregated-output] npm-run-all', () => {
68
69
assert ( false , 'should fail' )
69
70
} )
70
71
71
- it ( 'npm-run-all command with parallel' , async ( ) => {
72
+ test ( 'npm-run-all command with parallel' , async ( ) => {
72
73
await runAll (
73
74
[ '--parallel' , 'test-task:delayed first 5000' , 'test-task:delayed second 1000' , 'test-task:delayed third 3000' , '--silent' , '--aggregate-output' ] ,
74
75
stdout
75
76
)
76
77
assert . equal ( stdout . value , EXPECTED_PARALLELIZED_TEXT )
77
78
} )
78
79
79
- it ( 'npm-run-all command without parallel should fail' , async ( ) => {
80
+ test ( 'npm-run-all command without parallel should fail' , async ( ) => {
80
81
try {
81
82
await runAll (
82
83
[ 'test-task:delayed first 5000' , 'test-task:delayed second 1000' , 'test-task:delayed third 3000' , '--silent' , '--aggregate-output' ] ,
@@ -88,7 +89,7 @@ describe('[aggregated-output] npm-run-all', () => {
88
89
assert ( false , 'should fail' )
89
90
} )
90
91
91
- it ( 'run-s command should fail' , async ( ) => {
92
+ test ( 'run-s command should fail' , async ( ) => {
92
93
try {
93
94
await runSeq (
94
95
[ 'test-task:delayed first 5000' , 'test-task:delayed second 1000' , 'test-task:delayed third 3000' , '--silent' , '--aggregate-output' ] ,
@@ -100,7 +101,7 @@ describe('[aggregated-output] npm-run-all', () => {
100
101
assert ( false , 'should fail' )
101
102
} )
102
103
103
- it ( 'run-p command' , async ( ) => {
104
+ test ( 'run-p command' , async ( ) => {
104
105
await runPar (
105
106
[
106
107
'test-task:delayed first 5000' ,
0 commit comments