Skip to content

Commit 60cbe68

Browse files
committed
Add more error checks in node port test.
1 parent 2e2a5e0 commit 60cbe68

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/ports/node_port/test/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ describe('metacall', () => {
4545
describe('fail', () => {
4646
it('require', () => {
4747
assert.throws(() => { require('./asd.invalid') }, new Error('Cannot find module \'./asd.invalid\''));
48+
// TODO: Improve error messages
49+
assert.throws(() => { require('./asd.py') }, new Error('MetaCall could not load from file'));
50+
assert.throws(() => { require('./asd.rb') }, new Error('MetaCall could not load from file'));
51+
assert.throws(() => { require('./asd.cs') }, new Error('MetaCall could not load from file'));
52+
// TODO: Implement TS with NodeJS compatibility
53+
assert.throws(() => { require('./asd.ts') }, new Error('Cannot find module \'./asd.ts\''));
54+
assert.throws(() => { require('./asd.tsx') }, new Error('Cannot find module \'./asd.tsx\''));
4855
});
4956
});
5057

0 commit comments

Comments
 (0)