Skip to content

Commit

Permalink
test: add debug logging to diagnose CI issue
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfaith committed Dec 23, 2024
1 parent fbace7c commit 7b7ceba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/src/rules/no-unused-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,7 @@ describe('parser ignores prefixes like BOM and hashbang', () => {

(isESLint9 ? describe : describe.skip)('with eslint 9+', () => {
it('provides meaningful error when eslintrc is not present', () => {
this.timeout(0);
const tmp = require('tmp');

// Create temp directory outside of project root
Expand All @@ -1502,16 +1503,10 @@ describe('parser ignores prefixes like BOM and hashbang', () => {
let errorMessage = '';

// Install the plugin and run the lint command in the temp directory
try {
execSync(`npm run build`);
} catch (error) {
console.log(`build error: ${error.stderr.toString()}`)
errorMessage = error.stderr.toString();
}
try {
execSync(`npm install -D ${process.cwd()} && npm run lint`, { cwd: tempDir.name });
} catch (error) {
console.log(`lint error: ${error.stderr.toString()}`)
console.log(`lint error: ${error.stderr.toString()}`);
errorMessage = error.stderr.toString();
}

Expand Down

0 comments on commit 7b7ceba

Please sign in to comment.