Skip to content

Commit

Permalink
Add E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Nov 22, 2024
1 parent 6e4437f commit f0bf972
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/wxt/e2e/tests/auto-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,40 @@ describe('Auto Imports', () => {
).toMatchSnapshot();
});

it('"enabled: false" should NOT output an ESlint config file', async () => {
const project = new TestProject();
project.addFile('entrypoints/popup.html', `<html></html>`);

await project.prepare({
imports: {
eslintrc: {
enabled: false,
},
},
});

expect(await project.fileExists('.wxt/eslint-auto-imports.mjs')).toBe(
false,
);
expect(await project.fileExists('.wxt/eslintrc-auto-import.json')).toBe(
false,
);
});

it('should NOT output an ESlint config file by default', async () => {
const project = new TestProject();
project.addFile('entrypoints/popup.html', `<html></html>`);

await project.prepare();

expect(await project.fileExists('.wxt/eslint-auto-imports.mjs')).toBe(
false,
);
expect(await project.fileExists('.wxt/eslintrc-auto-import.json')).toBe(
false,
);
});

it('should allow customizing the output', async () => {
const project = new TestProject();
project.addFile('entrypoints/popup.html', `<html></html>`);
Expand Down

0 comments on commit f0bf972

Please sign in to comment.