Sha256: 51ec5eacb4582cf9c61a84638de931fe55847a9412fabb5f1c0cae296051f24c

Contents?: true

Size: 763 Bytes

Versions: 24

Compression:

Stored size: 763 Bytes

Contents

var path = require('path');
var test = require('tape');
var resolve = require('../');

test('dotdot', function (t) {
    t.plan(4);
    var dir = __dirname + '/dotdot/abc';
    
    resolve('..', { basedir : dir }, function (err, res, pkg) {
        t.ifError(err);
        t.equal(res, __dirname + '/dotdot/index.js');
    });
    
    resolve('.', { basedir : dir }, function (err, res, pkg) {
        t.ifError(err);
        t.equal(res, dir + '/index.js');
    });
});

test('dotdot sync', function (t) {
    t.plan(2);
    var dir = __dirname + '/dotdot/abc';
    
    var a = resolve.sync('..', { basedir : dir });
    t.equal(a, __dirname + '/dotdot/index.js');
    
    var b = resolve.sync('.', { basedir : dir });
    t.equal(b, dir + '/index.js');
});

Version data entries

24 entries across 19 versions & 8 rubygems

Version Path
gulp_assets-1.0.0.pre.4 template/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot.js
gulp_assets-1.0.0.pre.4 template/node_modules/babel-core/node_modules/resolve/test/dotdot.js
gulp_assets-1.0.0.pre.3 template/node_modules/gulp/node_modules/liftoff/node_modules/resolve/test/dotdot.js
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/node_modules/resolve/test/dotdot.js