tests(module-runtime): added node_module error validation

This commit is contained in:
Gabriel Grubba
2022-08-30 16:18:15 -03:00
parent 0255d06728
commit 4317e423f1

View File

@@ -11,7 +11,12 @@ Tinytest.add('errors - standard', function (test) {
}, 'Cannot find package "foo". Try "meteor add foo".');
});
Tinytest.add('errors - node_modules', function (test) {
var require = meteorInstall();
test.throws(() => {
require('./node_modules/foo');
}, "Cannot find module './node_modules/foo'");
});
if (Meteor.isServer) {
Tinytest.add('server - throwClientError', function (test) {