Sha256: 4a375cbec7d67287ad34c20eb54b3b122c3bdaa5392136cdbcd62deb5a12a454

Contents?: true

Size: 792 Bytes

Versions: 7

Compression:

Stored size: 792 Bytes

Contents

var parser = require('../');
var test = require('tap').test;
var through = require('through2');
var path = require('path');

// Test that p.options.expose is defined and that the row is properly exposed
// (resolved to the absolute pathname corresponding to the `file` value passed
// in the row, and set in opts.expose).
test('row is exposed', function (t) {
    t.plan(1);
    var common_path = path.join(__dirname, '/files/main');
    var opts = { expose: {} };
    var p = parser(opts);
    // Note pathname without extension.
    p.end({ file: common_path, expose: "whatever" });
    p.on('error', t.fail.bind(t));

    p.pipe(through.obj());

    p.on('end', function () {
        // Note pathname with extension.
        t.equal(opts.expose.whatever, common_path + '.js');
    });
});

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
minimum_viable_product-0.0.11 test/dummy/node_modules/module-deps/test/row_expose.js
brwy_rails-0.0.6 test/dummy/node_modules/module-deps/test/row_expose.js
brwy_rails-0.0.5 test/dummy/node_modules/module-deps/test/row_expose.js
brwy_rails-0.0.4 test/dummy/node_modules/module-deps/test/row_expose.js
brwy_rails-0.0.3 test/dummy/node_modules/module-deps/test/row_expose.js
brwy_rails-0.0.2 test/dummy/node_modules/module-deps/test/row_expose.js
brwy_rails-0.0.1 test/dummy/node_modules/module-deps/test/row_expose.js