source: imaps-frontend/node_modules/resolve/test/precedence.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 646 bytes
Line 
1var path = require('path');
2var test = require('tape');
3var resolve = require('../');
4
5test('precedence', function (t) {
6 t.plan(3);
7 var dir = path.join(__dirname, 'precedence/aaa');
8
9 resolve('./', { basedir: dir }, function (err, res, pkg) {
10 t.ifError(err);
11 t.equal(res, path.join(dir, 'index.js'));
12 t.equal(pkg.name, 'resolve');
13 });
14});
15
16test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
17 t.plan(1);
18 var dir = path.join(__dirname, 'precedence/bbb');
19
20 resolve('./', { basedir: dir }, function (err, res, pkg) {
21 t.ok(err);
22 });
23});
Note: See TracBrowser for help on using the repository browser.