File: core-sync.js

package info (click to toggle)
node-browser-resolve 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 716 kB
  • sloc: javascript: 927; makefile: 15; sh: 3
file content (17 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// test loading core modules
var assert = require('assert');
var resolve = require('../');

var shims = {
    events: 'foo'
};

it('shim found', function() {
    var path = resolve.sync('events', { modules: shims });
    assert.equal(path, 'foo');
});

it('core shim not found', function() {
    var path = resolve.sync('http', {});
    assert.equal(path, 'http');
});