Skip to content

Commit

Permalink
test: add sensitive warning tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OceanPresentChao committed Oct 23, 2023
1 parent c32bdac commit 4f0d5f7
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/rspack/tests/Stats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ describe("Stats", () => {
<t> process module group map: X ms
<t> ensure max size fit: X ms
LOG from rspack.WarnCaseSensitiveModulesPlugin
<t> check case sensitive modules: X ms
LOG from rspack.buildChunkGraph
<t> prepare entrypoints: X ms
<t> process queue: X ms
Expand Down
Empty file.
Empty file.
8 changes: 8 additions & 0 deletions packages/rspack/tests/cases/warnings/case-sensitive/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
it("should return different modules with different casing", function () {
var a = require("./a");
var A = require("./A");
var b = require("./b/file.js");
var B = require("./B/file.js");
expect(a).not.toBe(A);
expect(b).not.toBe(B);
});
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
it("should return different modules with different casing", function () {
var a = require("./a");
var A = require("./A");
var b = require("./b/file.js");
var B = require("./B/file.js");
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// expect 2 warnings
// warning info includes user path, so it is not stable
module.exports = [
"",""
];

0 comments on commit 4f0d5f7

Please sign in to comment.