ts-repo-utils 7.8.1 → 7.8.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/dist/cmd/assert-repo-is-clean.mjs +2 -1
- package/dist/cmd/assert-repo-is-clean.mjs.map +1 -1
- package/dist/cmd/check-should-run-type-checks.mjs +2 -1
- package/dist/cmd/check-should-run-type-checks.mjs.map +1 -1
- package/dist/cmd/format-diff-from.mjs +2 -1
- package/dist/cmd/format-diff-from.mjs.map +1 -1
- package/dist/cmd/format-uncommitted.mjs +2 -1
- package/dist/cmd/format-uncommitted.mjs.map +1 -1
- package/dist/cmd/gen-index-ts.mjs +2 -1
- package/dist/cmd/gen-index-ts.mjs.map +1 -1
- package/dist/functions/assert-ext.d.mts +0 -1
- package/dist/functions/assert-ext.d.mts.map +1 -1
- package/dist/functions/create-result-assert.d.mts +0 -1
- package/dist/functions/create-result-assert.d.mts.map +1 -1
- package/dist/functions/diff.d.mts +0 -1
- package/dist/functions/diff.d.mts.map +1 -1
- package/dist/functions/exec-async.d.mts +0 -1
- package/dist/functions/exec-async.d.mts.map +1 -1
- package/dist/functions/format.d.mts +0 -1
- package/dist/functions/format.d.mts.map +1 -1
- package/dist/functions/gen-index.d.mts +0 -1
- package/dist/functions/gen-index.d.mts.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.mjs +4 -5
- package/dist/functions/workspace-utils/execute-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs +2 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs +2 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs.map +1 -1
- package/dist/node-global.d.mts +0 -1
- package/dist/node-global.d.mts.map +1 -1
- package/package.json +16 -15
- package/src/cmd/assert-repo-is-clean.mts +1 -1
- package/src/cmd/check-should-run-type-checks.mts +1 -1
- package/src/cmd/format-diff-from.mts +1 -1
- package/src/cmd/format-uncommitted.mts +1 -1
- package/src/cmd/gen-index-ts.mts +1 -1
- package/src/functions/diff.test.mts +60 -8
- package/src/functions/exec-async.test.mts +17 -2
- package/src/functions/format.test.mts +57 -9
- package/src/functions/workspace-utils/execute-parallel.mts +4 -5
- package/src/functions/workspace-utils/run-cmd-in-parallel.mts +2 -1
- package/src/functions/workspace-utils/run-cmd-in-stages.mts +2 -1
- package/src/functions/workspace-utils/run-cmd-in-stages.test.mts +4 -3
- package/src/node-global.mts +0 -1
|
@@ -82,7 +82,7 @@ describe('diff', () => {
|
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
describe(
|
|
85
|
+
describe(getUntrackedFiles, () => {
|
|
86
86
|
test('should return empty array when no files are changed', async () => {
|
|
87
87
|
const { repoPath, cleanup } = await createTempRepo();
|
|
88
88
|
const repoFunctions = createRepoFunctions(repoPath);
|
|
@@ -91,6 +91,7 @@ describe('diff', () => {
|
|
|
91
91
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
92
92
|
|
|
93
93
|
expect(Result.isOk(result)).toBe(true);
|
|
94
|
+
|
|
94
95
|
if (Result.isOk(result)) {
|
|
95
96
|
expect(Array.isArray(result.value)).toBe(true);
|
|
96
97
|
}
|
|
@@ -113,8 +114,10 @@ describe('diff', () => {
|
|
|
113
114
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
114
115
|
|
|
115
116
|
expect(Result.isOk(result)).toBe(true);
|
|
117
|
+
|
|
116
118
|
if (Result.isOk(result)) {
|
|
117
119
|
const files = result.value;
|
|
120
|
+
|
|
118
121
|
expect(files).toContain(testFileName);
|
|
119
122
|
}
|
|
120
123
|
} finally {
|
|
@@ -142,8 +145,10 @@ describe('diff', () => {
|
|
|
142
145
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
143
146
|
|
|
144
147
|
expect(Result.isOk(result)).toBe(true);
|
|
148
|
+
|
|
145
149
|
if (Result.isOk(result)) {
|
|
146
150
|
const files = result.value;
|
|
151
|
+
|
|
147
152
|
expect(files).not.toContain(testFileName);
|
|
148
153
|
}
|
|
149
154
|
} finally {
|
|
@@ -176,8 +181,10 @@ describe('diff', () => {
|
|
|
176
181
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
177
182
|
|
|
178
183
|
expect(Result.isOk(result)).toBe(true);
|
|
184
|
+
|
|
179
185
|
if (Result.isOk(result)) {
|
|
180
186
|
const files = result.value;
|
|
187
|
+
|
|
181
188
|
expect(files).toContain(newFile);
|
|
182
189
|
expect(files).not.toContain(modifyFile);
|
|
183
190
|
}
|
|
@@ -194,11 +201,13 @@ describe('diff', () => {
|
|
|
194
201
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
195
202
|
|
|
196
203
|
expect(Result.isOk(result)).toBe(true);
|
|
204
|
+
|
|
197
205
|
if (Result.isOk(result)) {
|
|
198
206
|
const files = result.value;
|
|
199
207
|
// Verify no deleted files are included (status 'D')
|
|
200
208
|
for (const file of files) {
|
|
201
|
-
|
|
209
|
+
expectTypeOf(file).toBeString();
|
|
210
|
+
|
|
202
211
|
expect(file.length).toBeGreaterThan(0);
|
|
203
212
|
}
|
|
204
213
|
}
|
|
@@ -229,12 +238,14 @@ describe('diff', () => {
|
|
|
229
238
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
230
239
|
|
|
231
240
|
expect(Result.isOk(result)).toBe(true);
|
|
241
|
+
|
|
232
242
|
if (Result.isOk(result)) {
|
|
233
243
|
const files = result.value;
|
|
234
244
|
|
|
235
245
|
// Each file should be a non-empty string
|
|
236
246
|
for (const file of files) {
|
|
237
|
-
|
|
247
|
+
expectTypeOf(file).toBeString();
|
|
248
|
+
|
|
238
249
|
expect(file.trim()).toBe(file); // No leading/trailing whitespace
|
|
239
250
|
expect(file.length).toBeGreaterThan(0);
|
|
240
251
|
}
|
|
@@ -252,6 +263,7 @@ describe('diff', () => {
|
|
|
252
263
|
const result = await repoFunctions.getUntrackedFiles({ silent: true });
|
|
253
264
|
|
|
254
265
|
expect(Result.isOk(result)).toBe(true);
|
|
266
|
+
|
|
255
267
|
if (Result.isOk(result)) {
|
|
256
268
|
expect(Array.isArray(result.value)).toBe(true);
|
|
257
269
|
}
|
|
@@ -261,14 +273,16 @@ describe('diff', () => {
|
|
|
261
273
|
});
|
|
262
274
|
});
|
|
263
275
|
|
|
264
|
-
describe(
|
|
276
|
+
describe(getStagedFiles, () => {
|
|
265
277
|
test('should return empty array when no files are staged', async () => {
|
|
266
278
|
const { repoPath, cleanup } = await createTempRepo();
|
|
267
279
|
const repoFunctions = createRepoFunctions(repoPath);
|
|
268
280
|
|
|
269
281
|
try {
|
|
270
282
|
const result = await repoFunctions.getStagedFiles({ silent: true });
|
|
283
|
+
|
|
271
284
|
expect(Result.isOk(result)).toBe(true);
|
|
285
|
+
|
|
272
286
|
if (Result.isOk(result)) {
|
|
273
287
|
expect(Array.isArray(result.value)).toBe(true);
|
|
274
288
|
}
|
|
@@ -290,9 +304,12 @@ describe('diff', () => {
|
|
|
290
304
|
await execInRepo(`git add ${testFileName}`, { silent: true });
|
|
291
305
|
|
|
292
306
|
const result = await repoFunctions.getStagedFiles({ silent: true });
|
|
307
|
+
|
|
293
308
|
expect(Result.isOk(result)).toBe(true);
|
|
309
|
+
|
|
294
310
|
if (Result.isOk(result)) {
|
|
295
311
|
const files = result.value;
|
|
312
|
+
|
|
296
313
|
expect(files).toContain(testFileName);
|
|
297
314
|
}
|
|
298
315
|
} finally {
|
|
@@ -318,9 +335,12 @@ describe('diff', () => {
|
|
|
318
335
|
await execInRepo(`git add ${file1} ${file2}`, { silent: true });
|
|
319
336
|
|
|
320
337
|
const result = await repoFunctions.getStagedFiles({ silent: true });
|
|
338
|
+
|
|
321
339
|
expect(Result.isOk(result)).toBe(true);
|
|
340
|
+
|
|
322
341
|
if (Result.isOk(result)) {
|
|
323
342
|
const files = result.value;
|
|
343
|
+
|
|
324
344
|
expect(files).toContain(file1);
|
|
325
345
|
expect(files).toContain(file2);
|
|
326
346
|
}
|
|
@@ -355,9 +375,12 @@ describe('diff', () => {
|
|
|
355
375
|
const resultExclude = await repoFunctions.getStagedFiles({
|
|
356
376
|
silent: true,
|
|
357
377
|
});
|
|
378
|
+
|
|
358
379
|
expect(Result.isOk(resultExclude)).toBe(true);
|
|
380
|
+
|
|
359
381
|
if (Result.isOk(resultExclude)) {
|
|
360
382
|
const files = resultExclude.value;
|
|
383
|
+
|
|
361
384
|
expect(files).not.toContain(testFileName);
|
|
362
385
|
}
|
|
363
386
|
|
|
@@ -375,9 +398,12 @@ describe('diff', () => {
|
|
|
375
398
|
excludeDeleted: false,
|
|
376
399
|
silent: true,
|
|
377
400
|
});
|
|
401
|
+
|
|
378
402
|
expect(Result.isOk(resultInclude)).toBe(true);
|
|
403
|
+
|
|
379
404
|
if (Result.isOk(resultInclude)) {
|
|
380
405
|
const files = resultInclude.value;
|
|
406
|
+
|
|
381
407
|
expect(files).toContain(testFileName);
|
|
382
408
|
}
|
|
383
409
|
} else {
|
|
@@ -397,12 +423,15 @@ describe('diff', () => {
|
|
|
397
423
|
|
|
398
424
|
try {
|
|
399
425
|
const result = await repoFunctions.getStagedFiles({ silent: true });
|
|
426
|
+
|
|
400
427
|
expect(Result.isOk(result)).toBe(true);
|
|
428
|
+
|
|
401
429
|
if (Result.isOk(result)) {
|
|
402
430
|
const files = result.value;
|
|
403
431
|
// Each file should be a non-empty string
|
|
404
432
|
for (const file of files) {
|
|
405
|
-
|
|
433
|
+
expectTypeOf(file).toBeString();
|
|
434
|
+
|
|
406
435
|
expect(file.trim()).toBe(file); // No leading/trailing whitespace
|
|
407
436
|
}
|
|
408
437
|
}
|
|
@@ -417,7 +446,9 @@ describe('diff', () => {
|
|
|
417
446
|
|
|
418
447
|
try {
|
|
419
448
|
const result = await repoFunctions.getStagedFiles({ silent: true });
|
|
449
|
+
|
|
420
450
|
expect(Result.isOk(result)).toBe(true);
|
|
451
|
+
|
|
421
452
|
if (Result.isOk(result)) {
|
|
422
453
|
expect(Array.isArray(result.value)).toBe(true);
|
|
423
454
|
}
|
|
@@ -432,6 +463,7 @@ describe('diff', () => {
|
|
|
432
463
|
|
|
433
464
|
try {
|
|
434
465
|
const result = await repoFunctions.getStagedFiles({ silent: true });
|
|
466
|
+
|
|
435
467
|
// Should always return a Result, either Ok or Err
|
|
436
468
|
expect(Result.isOk(result) || Result.isErr(result)).toBe(true);
|
|
437
469
|
} finally {
|
|
@@ -440,14 +472,16 @@ describe('diff', () => {
|
|
|
440
472
|
});
|
|
441
473
|
});
|
|
442
474
|
|
|
443
|
-
describe(
|
|
475
|
+
describe(getModifiedFiles, () => {
|
|
444
476
|
test('should return empty array when no files are modified', async () => {
|
|
445
477
|
const { repoPath, cleanup } = await createTempRepo();
|
|
446
478
|
const repoFunctions = createRepoFunctions(repoPath);
|
|
447
479
|
|
|
448
480
|
try {
|
|
449
481
|
const result = await repoFunctions.getModifiedFiles({ silent: true });
|
|
482
|
+
|
|
450
483
|
expect(Result.isOk(result)).toBe(true);
|
|
484
|
+
|
|
451
485
|
if (Result.isOk(result)) {
|
|
452
486
|
expect(Array.isArray(result.value)).toBe(true);
|
|
453
487
|
}
|
|
@@ -476,9 +510,12 @@ describe('diff', () => {
|
|
|
476
510
|
await fs.writeFile(testFilePath, 'modified content');
|
|
477
511
|
|
|
478
512
|
const result = await repoFunctions.getModifiedFiles({ silent: true });
|
|
513
|
+
|
|
479
514
|
expect(Result.isOk(result)).toBe(true);
|
|
515
|
+
|
|
480
516
|
if (Result.isOk(result)) {
|
|
481
517
|
const files = result.value;
|
|
518
|
+
|
|
482
519
|
expect(files).toContain(testFileName);
|
|
483
520
|
}
|
|
484
521
|
} finally {
|
|
@@ -511,9 +548,12 @@ describe('diff', () => {
|
|
|
511
548
|
await fs.writeFile(filePath2, 'modified content 2');
|
|
512
549
|
|
|
513
550
|
const result = await repoFunctions.getModifiedFiles({ silent: true });
|
|
551
|
+
|
|
514
552
|
expect(Result.isOk(result)).toBe(true);
|
|
553
|
+
|
|
515
554
|
if (Result.isOk(result)) {
|
|
516
555
|
const files = result.value;
|
|
556
|
+
|
|
517
557
|
expect(files).toContain(file1);
|
|
518
558
|
expect(files).toContain(file2);
|
|
519
559
|
}
|
|
@@ -545,9 +585,12 @@ describe('diff', () => {
|
|
|
545
585
|
const resultExclude = await repoFunctions.getModifiedFiles({
|
|
546
586
|
silent: true,
|
|
547
587
|
});
|
|
588
|
+
|
|
548
589
|
expect(Result.isOk(resultExclude)).toBe(true);
|
|
590
|
+
|
|
549
591
|
if (Result.isOk(resultExclude)) {
|
|
550
592
|
const files = resultExclude.value;
|
|
593
|
+
|
|
551
594
|
expect(files).not.toContain(testFileName);
|
|
552
595
|
}
|
|
553
596
|
|
|
@@ -556,9 +599,12 @@ describe('diff', () => {
|
|
|
556
599
|
excludeDeleted: false,
|
|
557
600
|
silent: true,
|
|
558
601
|
});
|
|
602
|
+
|
|
559
603
|
expect(Result.isOk(resultInclude)).toBe(true);
|
|
604
|
+
|
|
560
605
|
if (Result.isOk(resultInclude)) {
|
|
561
606
|
const files = resultInclude.value;
|
|
607
|
+
|
|
562
608
|
expect(files).toContain(testFileName);
|
|
563
609
|
}
|
|
564
610
|
} finally {
|
|
@@ -572,12 +618,15 @@ describe('diff', () => {
|
|
|
572
618
|
|
|
573
619
|
try {
|
|
574
620
|
const result = await repoFunctions.getModifiedFiles({ silent: true });
|
|
621
|
+
|
|
575
622
|
expect(Result.isOk(result)).toBe(true);
|
|
623
|
+
|
|
576
624
|
if (Result.isOk(result)) {
|
|
577
625
|
const files = result.value;
|
|
578
626
|
// Each file should be a non-empty string
|
|
579
627
|
for (const file of files) {
|
|
580
|
-
|
|
628
|
+
expectTypeOf(file).toBeString();
|
|
629
|
+
|
|
581
630
|
expect(file.trim()).toBe(file); // No leading/trailing whitespace
|
|
582
631
|
}
|
|
583
632
|
}
|
|
@@ -592,7 +641,9 @@ describe('diff', () => {
|
|
|
592
641
|
|
|
593
642
|
try {
|
|
594
643
|
const result = await repoFunctions.getModifiedFiles({ silent: true });
|
|
644
|
+
|
|
595
645
|
expect(Result.isOk(result)).toBe(true);
|
|
646
|
+
|
|
596
647
|
if (Result.isOk(result)) {
|
|
597
648
|
expect(Array.isArray(result.value)).toBe(true);
|
|
598
649
|
}
|
|
@@ -607,6 +658,7 @@ describe('diff', () => {
|
|
|
607
658
|
|
|
608
659
|
try {
|
|
609
660
|
const result = await repoFunctions.getModifiedFiles({ silent: true });
|
|
661
|
+
|
|
610
662
|
// Should always return a Result, either Ok or Err
|
|
611
663
|
expect(Result.isOk(result) || Result.isErr(result)).toBe(true);
|
|
612
664
|
} finally {
|
|
@@ -615,7 +667,7 @@ describe('diff', () => {
|
|
|
615
667
|
});
|
|
616
668
|
});
|
|
617
669
|
|
|
618
|
-
describe(
|
|
670
|
+
describe(getDiffFrom, () => {
|
|
619
671
|
test('should work with silent option', async () => {
|
|
620
672
|
const { repoPath, cleanup, execInRepo } = await createTempRepo();
|
|
621
673
|
const repoFunctions = createRepoFunctions(repoPath);
|
|
@@ -21,11 +21,13 @@ describe('exec-async', () => {
|
|
|
21
21
|
(globalThis as any).echo = originalEcho;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
|
|
24
25
|
describe('basic command execution', () => {
|
|
25
26
|
test('should execute simple command successfully', async () => {
|
|
26
27
|
const result = await $('echo "hello world"', { silent: true });
|
|
27
28
|
|
|
28
29
|
expect(Result.isOk(result)).toBe(true);
|
|
30
|
+
|
|
29
31
|
if (Result.isOk(result)) {
|
|
30
32
|
expect(result.value.stdout.trim()).toBe('hello world');
|
|
31
33
|
expect(result.value.stderr).toBe('');
|
|
@@ -36,6 +38,7 @@ describe('exec-async', () => {
|
|
|
36
38
|
const result = await $('echo "line1\nline2\nline3"', { silent: true });
|
|
37
39
|
|
|
38
40
|
expect(Result.isOk(result)).toBe(true);
|
|
41
|
+
|
|
39
42
|
if (Result.isOk(result)) {
|
|
40
43
|
expect(result.value.stdout.trim()).toBe('line1\nline2\nline3');
|
|
41
44
|
expect(result.value.stderr).toBe('');
|
|
@@ -46,6 +49,7 @@ describe('exec-async', () => {
|
|
|
46
49
|
const result = await $('true', { silent: true });
|
|
47
50
|
|
|
48
51
|
expect(Result.isOk(result)).toBe(true);
|
|
52
|
+
|
|
49
53
|
if (Result.isOk(result)) {
|
|
50
54
|
expect(result.value.stdout).toBe('');
|
|
51
55
|
expect(result.value.stderr).toBe('');
|
|
@@ -58,6 +62,7 @@ describe('exec-async', () => {
|
|
|
58
62
|
const result = await $('nonexistent_command_xyz', { silent: true });
|
|
59
63
|
|
|
60
64
|
expect(Result.isErr(result)).toBe(true);
|
|
65
|
+
|
|
61
66
|
if (Result.isErr(result)) {
|
|
62
67
|
expect(result.value).toBeDefined();
|
|
63
68
|
expect(result.value.code).toBeDefined();
|
|
@@ -68,6 +73,7 @@ describe('exec-async', () => {
|
|
|
68
73
|
const result = await $('exit 1', { silent: true });
|
|
69
74
|
|
|
70
75
|
expect(Result.isErr(result)).toBe(true);
|
|
76
|
+
|
|
71
77
|
if (Result.isErr(result)) {
|
|
72
78
|
expect(result.value).toBeDefined();
|
|
73
79
|
expect(result.value.code).toBe(1);
|
|
@@ -80,6 +86,7 @@ describe('exec-async', () => {
|
|
|
80
86
|
});
|
|
81
87
|
|
|
82
88
|
expect(Result.isErr(result)).toBe(true);
|
|
89
|
+
|
|
83
90
|
if (Result.isErr(result)) {
|
|
84
91
|
expect(result.value).toBeDefined();
|
|
85
92
|
}
|
|
@@ -115,8 +122,9 @@ describe('exec-async', () => {
|
|
|
115
122
|
const result = await $('echo "test"', { silent: true });
|
|
116
123
|
|
|
117
124
|
expect(Result.isOk(result)).toBe(true);
|
|
125
|
+
|
|
118
126
|
if (Result.isOk(result)) {
|
|
119
|
-
|
|
127
|
+
expectTypeOf(result.value.stdout).toBeString();
|
|
120
128
|
}
|
|
121
129
|
});
|
|
122
130
|
|
|
@@ -127,6 +135,7 @@ describe('exec-async', () => {
|
|
|
127
135
|
});
|
|
128
136
|
|
|
129
137
|
expect(Result.isOk(result)).toBe(true);
|
|
138
|
+
|
|
130
139
|
if (Result.isOk(result)) {
|
|
131
140
|
expect(Buffer.isBuffer(result.value.stdout)).toBe(true);
|
|
132
141
|
expect(Buffer.isBuffer(result.value.stderr)).toBe(true);
|
|
@@ -137,6 +146,7 @@ describe('exec-async', () => {
|
|
|
137
146
|
const result = await $('echo "test"', { silent: true, encoding: null });
|
|
138
147
|
|
|
139
148
|
expect(Result.isOk(result)).toBe(true);
|
|
149
|
+
|
|
140
150
|
if (Result.isOk(result)) {
|
|
141
151
|
expect(Buffer.isBuffer(result.value.stdout)).toBe(true);
|
|
142
152
|
expect(Buffer.isBuffer(result.value.stderr)).toBe(true);
|
|
@@ -150,8 +160,10 @@ describe('exec-async', () => {
|
|
|
150
160
|
});
|
|
151
161
|
|
|
152
162
|
expect(Result.isOk(result)).toBe(true);
|
|
163
|
+
|
|
153
164
|
if (Result.isOk(result)) {
|
|
154
|
-
|
|
165
|
+
expectTypeOf(result.value.stdout).toBeString();
|
|
166
|
+
|
|
155
167
|
expect(result.value.stdout.trim()).toBe('test 日本語');
|
|
156
168
|
}
|
|
157
169
|
});
|
|
@@ -164,6 +176,7 @@ describe('exec-async', () => {
|
|
|
164
176
|
});
|
|
165
177
|
|
|
166
178
|
expect(Result.isOk(result)).toBe(true);
|
|
179
|
+
|
|
167
180
|
if (Result.isOk(result)) {
|
|
168
181
|
expect(result.value.stdout.trim()).toBe('hello world');
|
|
169
182
|
}
|
|
@@ -173,6 +186,7 @@ describe('exec-async', () => {
|
|
|
173
186
|
const result = await $('echo "first" && echo "second"', { silent: true });
|
|
174
187
|
|
|
175
188
|
expect(Result.isOk(result)).toBe(true);
|
|
189
|
+
|
|
176
190
|
if (Result.isOk(result)) {
|
|
177
191
|
expect(result.value.stdout.trim()).toBe('first\nsecond');
|
|
178
192
|
}
|
|
@@ -182,6 +196,7 @@ describe('exec-async', () => {
|
|
|
182
196
|
const result = await $('echo "first"; echo "second"', { silent: true });
|
|
183
197
|
|
|
184
198
|
expect(Result.isOk(result)).toBe(true);
|
|
199
|
+
|
|
185
200
|
if (Result.isOk(result)) {
|
|
186
201
|
expect(result.value.stdout.trim()).toBe('first\nsecond');
|
|
187
202
|
}
|