-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
good first issuehelp wantedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
We currently use suite and test instead of describe/it which is more common.
We should switch - can use a codemod cc @DrewML
Example:
babel/packages/babel-cli/test/index.js
Lines 142 to 173 in fd218ab
| suite("bin/" + binName, function () { | |
| _.each(fs.readdirSync(suiteLoc), function (testName) { | |
| if (testName[0] === ".") return; | |
| var testLoc = path.join(suiteLoc, testName); | |
| var opts = { | |
| args: [] | |
| }; | |
| var optionsLoc = path.join(testLoc, "options.json"); | |
| if (pathExists.sync(optionsLoc)) _.merge(opts, require(optionsLoc)); | |
| _.each(["stdout", "stdin", "stderr"], function (key) { | |
| var loc = path.join(testLoc, key + ".txt"); | |
| if (pathExists.sync(loc)) { | |
| opts[key] = helper.readFile(loc); | |
| } else { | |
| opts[key] = opts[key] || ""; | |
| } | |
| }); | |
| opts.outFiles = readDir(path.join(testLoc, "out-files")); | |
| opts.inFiles = readDir(path.join(testLoc, "in-files")); | |
| var babelrcLoc = path.join(testLoc, ".babelrc"); | |
| if (pathExists.sync(babelrcLoc)) { | |
| // copy .babelrc file to tmp directory | |
| opts.inFiles['.babelrc'] = helper.readFile(babelrcLoc); | |
| } | |
| test(testName, buildTest(binName, testName, opts)); |
check all packages/*/test
Metadata
Metadata
Assignees
Labels
good first issuehelp wantedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue