Skip to content

Commit 9bf1de0

Browse files
committed
refactor: fix int test 8
1 parent 8338f73 commit 9bf1de0

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

packages/plugin-eslint/src/lib/runner.int.test.ts

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -62,37 +62,40 @@ describe('executeRunner', () => {
6262
expect(osAgnosticAuditOutputs(res)).toMatchSnapshot();
6363
});
6464

65-
it('should execute runner with custom config using @code-pushup/eslint-config', async () => {
66-
const eslintTarget = 'code-pushup.eslint.config.mjs';
67-
const runnerFn = await createRunnerFunction({
68-
audits: await createAudits(eslintTarget),
69-
targets: [
70-
{
71-
eslintrc: eslintTarget,
72-
patterns: '.',
73-
},
74-
],
75-
});
65+
it.skipIf(process.platform === 'win32')(
66+
'should execute runner with custom config using @code-pushup/eslint-config',
67+
async () => {
68+
const eslintTarget = 'code-pushup.eslint.config.mjs';
69+
const runnerFn = await createRunnerFunction({
70+
audits: await createAudits(eslintTarget),
71+
targets: [
72+
{
73+
eslintrc: eslintTarget,
74+
patterns: '.',
75+
},
76+
],
77+
});
7678

77-
const json = await runnerFn({ outputDir: '' });
78-
// expect warnings from unicorn/filename-case rule from default config
79-
expect(json).toContainEqual(
80-
expect.objectContaining<Partial<AuditOutput>>({
81-
slug: 'unicorn-filename-case',
82-
displayValue: expect.stringMatching(/^\d+ warnings?$/),
83-
details: {
84-
issues: expect.arrayContaining<Issue>([
85-
{
86-
severity: 'warning',
87-
message:
88-
'Filename is not in kebab case. Rename it to `use-todos.js`.',
89-
source: expect.objectContaining<Issue['source']>({
90-
file: path.join(appDir, 'src', 'hooks', 'useTodos.js'),
91-
}),
92-
},
93-
]),
94-
},
95-
}),
96-
);
97-
});
79+
const json = await runnerFn({ outputDir: '' });
80+
// expect warnings from unicorn/filename-case rule from default config
81+
expect(json).toContainEqual(
82+
expect.objectContaining<Partial<AuditOutput>>({
83+
slug: 'unicorn-filename-case',
84+
displayValue: expect.stringMatching(/^\d+ warnings?$/),
85+
details: {
86+
issues: expect.arrayContaining<Issue>([
87+
{
88+
severity: 'warning',
89+
message:
90+
'Filename is not in kebab case. Rename it to `use-todos.js`.',
91+
source: expect.objectContaining<Issue['source']>({
92+
file: path.join(appDir, 'src', 'hooks', 'useTodos.js'),
93+
}),
94+
},
95+
]),
96+
},
97+
}),
98+
);
99+
},
100+
);
98101
}, 20_000);

0 commit comments

Comments
 (0)