• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../../common');
3const assert = require('assert');
4const bindingPath = require.resolve(`./build/${common.buildType}/binding`);
5const binding = require(bindingPath);
6assert.strictEqual(binding.hello(), 'world');
7console.log('binding.hello() =', binding.hello());
8
9// Test multiple loading of the same module.
10delete require.cache[bindingPath];
11const rebinding = require(bindingPath);
12assert.strictEqual(rebinding.hello(), 'world');
13assert.notStrictEqual(binding.hello, rebinding.hello);
14