@@ -113,10 +113,7 @@ test('does not sort package.json by default', () => {
113113 ) ;
114114} ) ;
115115
116- test . each ( [
117- [ 'parallel execution' , [ ] ] ,
118- [ 'serial execution' , [ '--no-parallel' ] ] ,
119- ] as const ) ( 'sorts package.json with %s' , ( _ , options ) => {
116+ test ( 'sorts package.json with workers' , ( ) => {
120117 writeProjectFile (
121118 'rstack.config.ts' ,
122119 `import { define } from 'rstack';
@@ -127,22 +124,19 @@ define.fmt({ sortPackageJson: true });
127124 writeProjectFile ( 'package.json' , packageJsonSource ) ;
128125 writeProjectFile ( 'packages/example/package.json' , packageJsonSource ) ;
129126
130- const result = runFmt ( [ ... options , 'package.json' , 'packages/example/package.json' ] ) ;
127+ const result = runFmt ( [ 'package.json' , 'packages/example/package.json' ] ) ;
131128
132129 expect ( result . status ) . toBe ( 0 ) ;
133130 expect ( result . stderr ) . toBe ( '' ) ;
134131 expect ( readProjectFile ( 'package.json' ) ) . toBe ( sortedPackageJson ) ;
135132 expect ( readProjectFile ( 'packages/example/package.json' ) ) . toBe ( sortedPackageJson ) ;
136133} ) ;
137134
138- test . each ( [
139- [ 'disabling parallel execution' , [ '--no-parallel' ] ] ,
140- [ 'configuring parallel worker count' , [ '--parallel-workers' , '1' ] ] ,
141- ] as const ) ( 'supports %s' , ( _ , options ) => {
135+ test ( 'supports configuring the worker count' , ( ) => {
142136 writeProjectFile ( 'first.ts' , 'const first="first"' ) ;
143137 writeProjectFile ( 'second.ts' , 'const second="second"' ) ;
144138
145- const result = runFmt ( [ ... options , 'first.ts' , 'second.ts' ] ) ;
139+ const result = runFmt ( [ '--parallel-workers' , '1' , 'first.ts' , 'second.ts' ] ) ;
146140
147141 expect ( result . status ) . toBe ( 0 ) ;
148142 expect ( result . stdout ) . toBe ( 'first.ts\nsecond.ts\n' ) ;
@@ -267,10 +261,7 @@ test('returns exit code 2 for config errors', () => {
267261 expect ( result . stderr ) . toContain ( 'invalid fmt config' ) ;
268262} ) ;
269263
270- test . each ( [
271- [ 'parallel execution' , [ ] ] ,
272- [ 'serial execution' , [ '--no-parallel' ] ] ,
273- ] as const ) ( 'formats with a project-local plugin using %s' , ( _ , options ) => {
264+ test ( 'formats with a project-local plugin in workers' , ( ) => {
274265 writeProjectFile (
275266 'rstack.config.ts' ,
276267 `import { define } from 'rstack';
@@ -284,7 +275,7 @@ define.fmt({
284275 writeProjectFile ( 'first.fixture' , '{"first":true}' ) ;
285276 writeProjectFile ( 'second.fixture' , '{"second":true}' ) ;
286277
287- const result = runFmt ( [ ... options , '*.fixture' ] ) ;
278+ const result = runFmt ( [ '*.fixture' ] ) ;
288279
289280 expect ( result . status ) . toBe ( 0 ) ;
290281 expect ( result . stdout ) . toBe ( 'first.fixture\nsecond.fixture\n' ) ;
@@ -293,7 +284,7 @@ define.fmt({
293284 expect ( readProjectFile ( 'second.fixture' ) ) . toBe ( '{ "second": true }\n' ) ;
294285} ) ;
295286
296- test ( 'formats mixed plugin overrides in parallel ' , ( ) => {
287+ test ( 'formats mixed plugin overrides in workers ' , ( ) => {
297288 writeProjectFile (
298289 'rstack.config.ts' ,
299290 `import { define } from 'rstack';
0 commit comments