Skip to content

Commit 7be4d22

Browse files
committed
Make script output more actionable, and add tsdoc
1 parent 0979736 commit 7be4d22

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

e2e/runAllTests.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ import fs from 'node:fs/promises';
33
import path from 'node:path';
44
import process from 'node:process';
55

6+
/**
7+
* Run All Tests: This script executes the lint command on all subfolders under `fixtures`, in order
8+
* to validate the correctness of our plugin. Each fixture installs the *built* package. So this should
9+
* only be run after a build has been done.
10+
*
11+
* For each directory under fixtures, the script runs `npm install` and `npm run lint`.
12+
*/
13+
614
const TEST_COMMAND = 'npm run lint';
715

816
const getRoot = () => {
@@ -32,14 +40,14 @@ const executeAllE2eTests = async () => {
3240
try {
3341
execSync(TEST_COMMAND, {
3442
cwd: testDir,
35-
stdio: ['ignore', 'ignore', 'pipe'],
43+
stdio: 'inherit',
3644
});
37-
console.log(`✅ Test passed\n`);
45+
console.log(`✅ Test passed`);
3846
} catch (error) {
3947
console.log(`❌ Test failed`);
40-
console.error(`${error}\n`);
4148
failedTests.push(dirName);
4249
}
50+
console.log(`\n${'-'.repeat(50)}\n`);
4351
}
4452

4553
if (failedTests.length) {

0 commit comments

Comments
 (0)