Replace target: uglify tests with forceAllTransforms in preset-env
This commit is contained in:
committed by
Brian Ng
parent
ad2019aa30
commit
d761d765bd
@@ -2,11 +2,11 @@
|
||||
"presets": [
|
||||
["../../../../lib", {
|
||||
"targets": {
|
||||
"chrome": 55,
|
||||
"uglify": true
|
||||
"chrome": 55
|
||||
},
|
||||
"modules": false,
|
||||
"useBuiltIns": "entry"
|
||||
"useBuiltIns": "entry",
|
||||
"forceAllTransforms": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
@@ -3,11 +3,11 @@
|
||||
["../../../../lib", {
|
||||
"targets": {
|
||||
"chrome": "55",
|
||||
"node": "7.6",
|
||||
"uglify": true
|
||||
"node": "7.6"
|
||||
},
|
||||
"modules": false,
|
||||
"useBuiltIns": "entry"
|
||||
"useBuiltIns": "entry",
|
||||
"forceAllTransforms": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
"presets": [
|
||||
["../../../../lib", {
|
||||
"targets": {
|
||||
"node": "7.6",
|
||||
"uglify": true
|
||||
"node": "7.6"
|
||||
},
|
||||
"modules": false,
|
||||
"useBuiltIns": "entry"
|
||||
"useBuiltIns": "entry",
|
||||
"forceAllTransforms": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -77,20 +77,6 @@ describe("babel-preset-env", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("returns true if uglify is specified as a target", () => {
|
||||
const plugin = {
|
||||
chrome: 50,
|
||||
};
|
||||
const targets = {
|
||||
chrome: "55.0.0",
|
||||
uglify: true,
|
||||
};
|
||||
assert.strictEqual(
|
||||
babelPresetEnv.isPluginRequired(targets, plugin),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
it("returns when target is a decimal", () => {
|
||||
const plugin = {
|
||||
node: 6.9,
|
||||
|
||||
@@ -31,15 +31,6 @@ describe("utils", () => {
|
||||
it("returns", () => {
|
||||
assert.deepStrictEqual(prettifyTargets({}), {});
|
||||
|
||||
assert.deepStrictEqual(
|
||||
prettifyTargets({
|
||||
uglify: true,
|
||||
}),
|
||||
{
|
||||
uglify: true,
|
||||
},
|
||||
);
|
||||
|
||||
assert.deepStrictEqual(
|
||||
prettifyTargets({
|
||||
chrome: "54.0.0",
|
||||
|
||||
Reference in New Issue
Block a user