Skip to content

Commit b30ecb4

Browse files
committed
prettier
1 parent e23d4dd commit b30ecb4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tools/spectral/ipa/__tests__/metrics/runMetricCollection.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ describe('tools/spectral/ipa/metrics/scripts/runMetricCollection.js', () => {
1818
it('should run without import/syntax errors', () => {
1919
const scriptPath = path.join(__dirname, '../../metrics/scripts/runMetricCollection.js');
2020

21-
// Run the script with Node.js
22-
const result = spawnSync('node', [scriptPath], {
21+
// Run the script with Node.js, providing a non-existent file path
22+
// This will cause it to fail early before doing any real work
23+
const result = spawnSync('node', [scriptPath, '/nonexistent/path/to/spec.json'], {
2324
encoding: 'utf8',
2425
timeout: 10000,
2526
});
2627

27-
// The script will fail because required files don't exist in the test environment,
28+
// The script will fail because the file doesn't exist,
2829
// but it should NOT fail with a SyntaxError about missing exports
2930
const output = result.stdout + result.stderr;
3031

3132
// Check that we don't have import/syntax errors
3233
expect(output).not.toMatch(/SyntaxError.*does not provide an export named/);
3334
expect(output).not.toMatch(/SyntaxError.*Unexpected token/);
3435

35-
// We expect it to fail with ENOENT for the missing collector results file
36+
// We expect it to fail due to missing files (either OAS file or collector results)
3637
// This proves the imports worked correctly
37-
expect(output).toMatch(/ENOENT.*ipa-collector-results-combined\.log/);
38+
expect(output).toMatch(/ENOENT|Could not find/);
3839
});
3940
});
40-

0 commit comments

Comments
 (0)