We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdc3fcd commit a32a493Copy full SHA for a32a493
1 file changed
test/configCases/output-module/node-globals/index.js
@@ -1,9 +1,9 @@
1
import { dir, file } from './cjs/file.js'
2
3
it("should generate correct __dirname", () => {
4
- expect(dir.slice(dir.lastIndexOf("/", dir.length - 2))).toBe("/node-globals/");
+ expect(dir.slice(dir.lastIndexOf("/", dir.length - 2))).toMatch(/[\\/]node-globals[\\/]/);
5
});
6
7
it("should generate correct __filename", () => {
8
- expect(file.slice(file.lastIndexOf("/"))).toBe("/main.mjs");
+ expect(file.slice(file.lastIndexOf("/"))).toMatch(/[\\/]main.mjs$/);
9
0 commit comments