• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../../common');
4const assert = require('assert');
5
6const re = new RegExp(
7  '^Error: The module \'.+\'\n' +
8  'was compiled against a different Node\\.js version using\n' +
9  'NODE_MODULE_VERSION 42\\. This version of Node\\.js requires\n' +
10  `NODE_MODULE_VERSION ${process.versions.modules}\\. ` +
11  'Please try re-compiling or re-installing\n' +
12  'the module \\(for instance, using `npm rebuild` or `npm install`\\)\\.$');
13
14assert.throws(() => require(`./build/${common.buildType}/binding`), re);
15