From 6a4f8c1400784b9305899a26468e5dfcd3059c3b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Jul 2015 17:09:53 -0400 Subject: [PATCH] add test for #53 --- test/function/does-not-hang-on-missing-module/_config.js | 8 ++++++++ test/function/does-not-hang-on-missing-module/main.js | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 test/function/does-not-hang-on-missing-module/_config.js create mode 100644 test/function/does-not-hang-on-missing-module/main.js diff --git a/test/function/does-not-hang-on-missing-module/_config.js b/test/function/does-not-hang-on-missing-module/_config.js new file mode 100644 index 0000000..afcdbcc --- /dev/null +++ b/test/function/does-not-hang-on-missing-module/_config.js @@ -0,0 +1,8 @@ +var assert = require( 'assert' ); + +module.exports = { + description: 'does not hang on missing module (#53)', + error: function ( error ) { + assert.ok( /Could not find package unlessYouCreatedThisFileForSomeReason/.test( error.message ) ); + } +}; diff --git a/test/function/does-not-hang-on-missing-module/main.js b/test/function/does-not-hang-on-missing-module/main.js new file mode 100644 index 0000000..f749c99 --- /dev/null +++ b/test/function/does-not-hang-on-missing-module/main.js @@ -0,0 +1,2 @@ +import doesNotExist from 'unlessYouCreatedThisFileForSomeReason'; +doesNotExist();