Sha256: 8d73ceeb5c042e961f64549d5b3d5843f116f0c00e93cb1d10675906e57f4cb0

Contents?: true

Size: 913 Bytes

Versions: 7

Compression:

Stored size: 913 Bytes

Contents

var test = require('tap').test;
var parents = require('../');

test('win32', function (t) {
    var dir = 'c:\\Program Files\\Maxis\\Sim City 2000\\cities';
    var dirs = parents(dir, { platform : 'win32' });
    t.same(dirs, [
        'c:\\Program Files\\Maxis\\Sim City 2000\\cities',
        'c:\\Program Files\\Maxis\\Sim City 2000',
        'c:\\Program Files\\Maxis',
        'c:\\Program Files',
        'c:',
    ]);
    t.end();
});

test('win32 c:', function (t) {
    var dirs = parents('c:\\', { platform : 'win32' });
    t.same(dirs, [ 'c:' ]);
    t.end();
});

test('win32 network drive', function (t) {
    var dirs = parents(
        '\\storageserver01\\Active Projects\\ProjectA',
        { platform : 'win32' }
    );
    t.same(dirs, [
        '\\storageserver01\\Active Projects\\ProjectA',
        '\\storageserver01\\Active Projects',
        '\\storageserver01'
    ]);
    t.end();
});

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
minimum_viable_product-0.0.11 test/dummy/node_modules/parents/test/win32.js
brwy_rails-0.0.6 test/dummy/node_modules/parents/test/win32.js
brwy_rails-0.0.5 test/dummy/node_modules/parents/test/win32.js
brwy_rails-0.0.4 test/dummy/node_modules/parents/test/win32.js
brwy_rails-0.0.3 test/dummy/node_modules/parents/test/win32.js
brwy_rails-0.0.2 test/dummy/node_modules/parents/test/win32.js
brwy_rails-0.0.1 test/dummy/node_modules/parents/test/win32.js