diff options
author | cjihrig <cjihrig@gmail.com> | 2017-01-04 10:29:40 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-01-09 12:05:02 -0500 |
commit | 775de9cc96d6fe01c049cd4a3d5ed2df922b88b6 (patch) | |
tree | 8c15b840db5946d4db521ca1fe89b695869a8602 /test/addons/node-module-version | |
parent | 8a12368a2090440bfd798abf68e5009445a8dced (diff) | |
download | android-node-v8-775de9cc96d6fe01c049cd4a3d5ed2df922b88b6.tar.gz android-node-v8-775de9cc96d6fe01c049cd4a3d5ed2df922b88b6.tar.bz2 android-node-v8-775de9cc96d6fe01c049cd4a3d5ed2df922b88b6.zip |
test: improve module version mismatch error check
Refs: https://github.com/nodejs/node/pull/10606
PR-URL: https://github.com/nodejs/node/pull/10636
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/addons/node-module-version')
-rw-r--r-- | test/addons/node-module-version/test.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/addons/node-module-version/test.js b/test/addons/node-module-version/test.js index 75d811de9c..94db088395 100644 --- a/test/addons/node-module-version/test.js +++ b/test/addons/node-module-version/test.js @@ -4,8 +4,11 @@ const common = require('../../common'); const assert = require('assert'); const re = new RegExp( - 'was compiled against a different Node.js version using\n' + - 'NODE_MODULE_VERSION 42. This version of Node.js requires\n' + - `NODE_MODULE_VERSION ${process.versions.modules}.`); + '^Error: The module \'.+\'\n' + + 'was compiled against a different Node\\.js version using\n' + + 'NODE_MODULE_VERSION 42\\. This version of Node\\.js requires\n' + + `NODE_MODULE_VERSION ${process.versions.modules}. ` + + 'Please try re-compiling or re-installing\n' + + 'the module \\(for instance, using `npm rebuild` or `npm install`\\)\\.$'); assert.throws(() => require(`./build/${common.buildType}/binding`), re); |