Rewrite config chain tests to use public loadOptions API. (#6909)

This commit is contained in:
Logan Smyth
2017-11-25 18:25:20 -08:00
committed by GitHub
parent cf62908bbd
commit cdf420d4d8
65 changed files with 353 additions and 1061 deletions

View File

@@ -83,6 +83,8 @@ class OptionManager {
delete options.plugins;
delete options.presets;
delete options.passPerPreset;
delete options.ignore;
delete options.only;
// "sourceMap" is just aliased to sourceMap, so copy it over as
// we merge the options together.

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
root-ignore

View File

@@ -1,4 +0,0 @@
{
"plugins": ["root"],
"extends": "./extended.babelrc.json"
}

View File

@@ -18,4 +18,5 @@ seventeen.js
eighteen.js
nineteen.js
twenty.js
plugin.js
**/plugin.js

View File

@@ -2,6 +2,8 @@ module.exports = function(api) {
api.env();
return {
comments: false,
plugins: [
require("./plugin"),
],
};
}

View File

@@ -0,0 +1,3 @@
module.exports = function() {
return {};
};

View File

@@ -1,3 +1,3 @@
{
comments: false,
plugins: ["./plugin"],
}

View File

@@ -0,0 +1,3 @@
module.exports = function() {
return {};
};

View File

@@ -1,5 +1,5 @@
{
"babel": {
"comments": false
"plugins": ["./plugin"]
}
}

View File

@@ -0,0 +1,3 @@
module.exports = function() {
return {};
};

View File

@@ -0,0 +1 @@
# Placeholder so the monorepo ignore isn't accessed

View File

@@ -0,0 +1 @@
src.js

View File

@@ -0,0 +1 @@
{45

View File

@@ -0,0 +1,3 @@
module.exports = function() {
throw new Error("Babelrc threw an error");
};

View File

@@ -0,0 +1,3 @@
module.exports = {
comments: true,
};

View File

@@ -0,0 +1,3 @@
{
comments: true,
}

View File

@@ -0,0 +1 @@
module.exports = {};

View File

@@ -0,0 +1 @@
module.exports = {};

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,3 @@
{
"babel": {235
}

View File

@@ -0,0 +1,3 @@
{
comments: true,
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,5 @@
{
"babel": {
"comments": true
}
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,5 +0,0 @@
{
"plugins": [
"dir2"
]
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,5 +0,0 @@
{
"name": "application-name",
"version": "0.0.1"
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,11 +0,0 @@
{
"plugins": ["env-base"],
"env": {
"foo": {
"plugins": ["env-foo"]
},
"bar": {
"plugins": ["env-bar"]
}
}
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,5 +0,0 @@
{
"plugins": [
"extended"
]
}

View File

@@ -1,6 +0,0 @@
{
ignore: [
"*",
"!folder",
],
}

View File

@@ -1,2 +0,0 @@
# Blank .gitignore to ensure this directory exists.
!.gitignore

View File

@@ -1,6 +0,0 @@
{
ignore: [
"*",
"!src.js",
],
}

View File

@@ -1,10 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var plugins = ["foo", "bar"];
exports.default = {
plugins: plugins
};

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,2 +0,0 @@
throw new Error("Something bad happened!");
module.exports = {}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1 +0,0 @@
module.exports = '';

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1 +0,0 @@
module.exports = null;

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,6 +0,0 @@
var plugins = ["foo", "bar"];
module.exports = {
extends: "../extended.babelrc.json",
plugins: plugins
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,7 +0,0 @@
module.exports = function(api) {
api.cache(true);
return {
compact: true,
};
};

View File

@@ -1,5 +0,0 @@
var plugins = ["foo", "bar"];
module.exports = {
plugins: plugins
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,5 +0,0 @@
{
"plugins": [
"json"
]
}

View File

@@ -1,5 +0,0 @@
module.exports = {
plugins: [
"js"
]
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,5 +0,0 @@
module.exports = {
plugins: [
"js"
]
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,3 +0,0 @@
{
"bad: "json"
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1,5 +0,0 @@
{
"plugins": [
"json"
]
}

View File

@@ -1,5 +0,0 @@
{
"plugins": [
"json"
]
}

View File

@@ -1 +0,0 @@
// empty

View File

@@ -1 +0,0 @@
pkg-ignore

View File

@@ -1,7 +0,0 @@
{
"name": "application-name",
"version": "0.0.1",
"babel": {
"plugins": ["pkg-plugin"]
}
}

View File

@@ -1 +0,0 @@
// empty