Skip to content

Commit a32a493

Browse files
vankopsokra
andauthored
fix for windows. apply suggestions from code review
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
1 parent fdc3fcd commit a32a493

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • test/configCases/output-module/node-globals
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { dir, file } from './cjs/file.js'
22

33
it("should generate correct __dirname", () => {
4-
expect(dir.slice(dir.lastIndexOf("/", dir.length - 2))).toBe("/node-globals/");
4+
expect(dir.slice(dir.lastIndexOf("/", dir.length - 2))).toMatch(/[\\/]node-globals[\\/]/);
55
});
66

77
it("should generate correct __filename", () => {
8-
expect(file.slice(file.lastIndexOf("/"))).toBe("/main.mjs");
8+
expect(file.slice(file.lastIndexOf("/"))).toMatch(/[\\/]main.mjs$/);
99
});

0 commit comments

Comments
 (0)