add assertVendor test helper
This commit is contained in:
@@ -18,6 +18,13 @@ var readFile = exports.readFile = function (filename) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.assertVendor = function (name) {
|
||||
if (!fs.existsSync(__dirname + "/../vendor/" + name)) {
|
||||
console.error("No vendor/" + name + " - run `make bootstrap`");
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
exports.get = function (entryName, entryLoc) {
|
||||
if (exports.cache[entryName]) return exports.cache[entryName];
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
if (process.env.SIMPLE_6TO5_TESTS) return;
|
||||
|
||||
require("./_helper").assertVendor("test262");
|
||||
|
||||
var transform = require("../lib/6to5/transformation/transform");
|
||||
var readdir = require("fs-readdir-recursive");
|
||||
var path = require("path");
|
||||
@@ -7,10 +9,6 @@ var fs = require("fs");
|
||||
var _ = require("lodash");
|
||||
|
||||
var test262Loc = __dirname + "/../vendor/test262";
|
||||
if (!fs.existsSync(test262Loc)) {
|
||||
console.error("No vendor/test262 - run `make bootstrap`");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var read = function (loc) {
|
||||
return readdir(loc).map(function (filename) {
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
if (!process.env.ALL_6TO5_TESTS) return;
|
||||
|
||||
require("./_helper").assertVendor("traceur");
|
||||
|
||||
var fs = require("fs");
|
||||
var _ = require("lodash");
|
||||
|
||||
var traceurLoc = __dirname + "/../vendor/traceur";
|
||||
if (!fs.existsSync(traceurLoc)) {
|
||||
console.error("No vendor/traceur - run `make bootstrap`");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
require("./_transformation-helper")({
|
||||
name: "traceur",
|
||||
loc: traceurLoc + "/test/feature",
|
||||
loc: __dirname + "/../vendor/traceur/test/feature",
|
||||
|
||||
ignoreSuites: [
|
||||
// these are all internal traceur tests or non-standard features
|
||||
|
||||
Reference in New Issue
Block a user