make super behaviour more spec compliant - fixes #32
This commit is contained in:
50
test/bin.js
Normal file
50
test/bin.js
Normal file
@@ -0,0 +1,50 @@
|
||||
var child = require("child_process");
|
||||
var fs = require("fs");
|
||||
|
||||
var tmpLoc = __dirname + "/tmp";
|
||||
|
||||
var readTree = function () {
|
||||
|
||||
};
|
||||
|
||||
var run = function (name, args, callback) {
|
||||
args = [__dirname + "/../bin." + name].concat(args);
|
||||
var spawn = child.spawn(process.execPath, args);
|
||||
|
||||
var data = "";
|
||||
|
||||
spawn.stdout.on("write", function (chunk) {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
spawn.on("close", function () {
|
||||
callback(data);
|
||||
});
|
||||
};
|
||||
|
||||
before(function () {
|
||||
if (!fs.existsSync(tmpLoc)) fs.mkdirSync(tmpLoc);
|
||||
process.chdir(tmpLoc);
|
||||
});
|
||||
|
||||
suite("bin/6to5", function () {
|
||||
test("--source-maps-inline");
|
||||
|
||||
test("--source-maps");
|
||||
|
||||
test("--whitelist");
|
||||
|
||||
test("--blacklist");
|
||||
|
||||
test("--out-file");
|
||||
|
||||
test("--out-dir");
|
||||
|
||||
test("stdout");
|
||||
});
|
||||
|
||||
suite("bin/6to5-node", function () {
|
||||
test("--eval");
|
||||
|
||||
test("--print");
|
||||
});
|
||||
Reference in New Issue
Block a user