Skip to content

Commit 2b7400a

Browse files
committed
test: added test that uses multibyte for path and resolves modules
1 parent d978610 commit 2b7400a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
3+
require('../common');
4+
const fixtures = require('../common/fixtures');
5+
const assert = require('assert');
6+
7+
// This test ensures that the module can be resolved
8+
// even if the path given to createRequire contains multibyte characters.
9+
10+
const { createRequire } = require('module');
11+
12+
const u = fixtures.fileURL('あ.js');
13+
14+
const reqToo = createRequire(u);
15+
assert.deepStrictEqual(reqToo('./experimental'), { ofLife: 42 });

0 commit comments

Comments
 (0)