Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80529 views
1
// test loading core modules
2
var assert = require('assert');
3
var resolve = require('../');
4
5
var shims = {
6
events: 'foo'
7
};
8
9
test('shim found', function() {
10
var path = resolve.sync('events', { modules: shims });
11
assert.equal(path, 'foo');
12
});
13
14
test('core shim not found', function() {
15
var path = resolve.sync('http', {});
16
assert.equal(path, 'http');
17
});
18
19