-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for webpack and turbopack ignore
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
turbopack/crates/turbopack-tests/tests/execution/turbopack/ignore/basic/input/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); |