Skip to content

Commit

Permalink
add test for webpack and turbopack ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Aug 2, 2024
1 parent 6d1c801 commit e99be01
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const webpackIgnore = require(/* webpackIgnore: true */ "./non-existent.js");
const turbopackIgnore = require(/* turbopackIgnore: true */ "./non-existent.js");
const webpackImport = import(/* webpackIgnore: false */ "./util.js");
const turbopackImport = import(/* turbopackIgnore: false */ "./util.js");

it("should ignore webpackIgnore comments", () => {
expect(webpackIgnore).toBeUndefined();
});

it("should ignore turbopackIgnore comments", () => {
expect(turbopackIgnore).toBeUndefined();
});

it("should not ignore webpackIgnore comments when webpackIgnore is false", () => {
expect(webpackImport).toBeDefined();
});

it("should not ignore turbopackIgnore comments when turbopackIgnore is false", () => {
expect(turbopackImport).toBeDefined();
});

0 comments on commit e99be01

Please sign in to comment.