From 4317e423f10035da868e4031bb39c54cf555feff Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:18:15 -0300 Subject: [PATCH] tests(module-runtime): added node_module error validation --- packages/modules-runtime/modules-runtime-tests.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/modules-runtime/modules-runtime-tests.js b/packages/modules-runtime/modules-runtime-tests.js index 2d771efcc6..267b059520 100644 --- a/packages/modules-runtime/modules-runtime-tests.js +++ b/packages/modules-runtime/modules-runtime-tests.js @@ -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) {