Add tests for static math methods (#8626)
This commit is contained in:
parent
79b2af5997
commit
e372129d00
@ -0,0 +1,33 @@
|
|||||||
|
Math.acosh;
|
||||||
|
|
||||||
|
Math.asinh;
|
||||||
|
|
||||||
|
Math.atanh;
|
||||||
|
|
||||||
|
Math.cbrt;
|
||||||
|
|
||||||
|
Math.clz32;
|
||||||
|
|
||||||
|
Math.cosh;
|
||||||
|
|
||||||
|
Math.expm1;
|
||||||
|
|
||||||
|
Math.fround;
|
||||||
|
|
||||||
|
Math.hypot;
|
||||||
|
|
||||||
|
Math.imul;
|
||||||
|
|
||||||
|
Math.log10;
|
||||||
|
|
||||||
|
Math.log1p;
|
||||||
|
|
||||||
|
Math.log2;
|
||||||
|
|
||||||
|
Math.sign;
|
||||||
|
|
||||||
|
Math.sinh;
|
||||||
|
|
||||||
|
Math.tanh;
|
||||||
|
|
||||||
|
Math.trunc;
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
["transform-runtime", {
|
||||||
|
"corejs": 2
|
||||||
|
}],
|
||||||
|
"transform-regenerator"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
var _Math$trunc = require("@babel/runtime-corejs2/core-js/math/trunc");
|
||||||
|
|
||||||
|
var _Math$tanh = require("@babel/runtime-corejs2/core-js/math/tanh");
|
||||||
|
|
||||||
|
var _Math$sinh = require("@babel/runtime-corejs2/core-js/math/sinh");
|
||||||
|
|
||||||
|
var _Math$sign = require("@babel/runtime-corejs2/core-js/math/sign");
|
||||||
|
|
||||||
|
var _Math$log2 = require("@babel/runtime-corejs2/core-js/math/log2");
|
||||||
|
|
||||||
|
var _Math$log1p = require("@babel/runtime-corejs2/core-js/math/log1p");
|
||||||
|
|
||||||
|
var _Math$log = require("@babel/runtime-corejs2/core-js/math/log10");
|
||||||
|
|
||||||
|
var _Math$imul = require("@babel/runtime-corejs2/core-js/math/imul");
|
||||||
|
|
||||||
|
var _Math$hypot = require("@babel/runtime-corejs2/core-js/math/hypot");
|
||||||
|
|
||||||
|
var _Math$fround = require("@babel/runtime-corejs2/core-js/math/fround");
|
||||||
|
|
||||||
|
var _Math$expm = require("@babel/runtime-corejs2/core-js/math/expm1");
|
||||||
|
|
||||||
|
var _Math$cosh = require("@babel/runtime-corejs2/core-js/math/cosh");
|
||||||
|
|
||||||
|
var _Math$clz = require("@babel/runtime-corejs2/core-js/math/clz32");
|
||||||
|
|
||||||
|
var _Math$cbrt = require("@babel/runtime-corejs2/core-js/math/cbrt");
|
||||||
|
|
||||||
|
var _Math$atanh = require("@babel/runtime-corejs2/core-js/math/atanh");
|
||||||
|
|
||||||
|
var _Math$asinh = require("@babel/runtime-corejs2/core-js/math/asinh");
|
||||||
|
|
||||||
|
var _Math$acosh = require("@babel/runtime-corejs2/core-js/math/acosh");
|
||||||
|
|
||||||
|
_Math$acosh;
|
||||||
|
_Math$asinh;
|
||||||
|
_Math$atanh;
|
||||||
|
_Math$cbrt;
|
||||||
|
_Math$clz;
|
||||||
|
_Math$cosh;
|
||||||
|
_Math$expm;
|
||||||
|
_Math$fround;
|
||||||
|
_Math$hypot;
|
||||||
|
_Math$imul;
|
||||||
|
_Math$log;
|
||||||
|
_Math$log1p;
|
||||||
|
_Math$log2;
|
||||||
|
_Math$sign;
|
||||||
|
_Math$sinh;
|
||||||
|
_Math$tanh;
|
||||||
|
_Math$trunc;
|
||||||
33
packages/babel-plugin-transform-runtime/test/fixtures/runtime-corejs2/math/input.js
vendored
Normal file
33
packages/babel-plugin-transform-runtime/test/fixtures/runtime-corejs2/math/input.js
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Math.acosh;
|
||||||
|
|
||||||
|
Math.asinh;
|
||||||
|
|
||||||
|
Math.atanh;
|
||||||
|
|
||||||
|
Math.cbrt;
|
||||||
|
|
||||||
|
Math.clz32;
|
||||||
|
|
||||||
|
Math.cosh;
|
||||||
|
|
||||||
|
Math.expm1;
|
||||||
|
|
||||||
|
Math.fround;
|
||||||
|
|
||||||
|
Math.hypot;
|
||||||
|
|
||||||
|
Math.imul;
|
||||||
|
|
||||||
|
Math.log10;
|
||||||
|
|
||||||
|
Math.log1p;
|
||||||
|
|
||||||
|
Math.log2;
|
||||||
|
|
||||||
|
Math.sign;
|
||||||
|
|
||||||
|
Math.sinh;
|
||||||
|
|
||||||
|
Math.tanh;
|
||||||
|
|
||||||
|
Math.trunc;
|
||||||
9
packages/babel-plugin-transform-runtime/test/fixtures/runtime-corejs2/math/options.json
vendored
Normal file
9
packages/babel-plugin-transform-runtime/test/fixtures/runtime-corejs2/math/options.json
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
["transform-runtime", {
|
||||||
|
"corejs": 2,
|
||||||
|
"version": "^7.0.1"
|
||||||
|
}],
|
||||||
|
"transform-regenerator"
|
||||||
|
]
|
||||||
|
}
|
||||||
51
packages/babel-plugin-transform-runtime/test/fixtures/runtime-corejs2/math/output.js
vendored
Normal file
51
packages/babel-plugin-transform-runtime/test/fixtures/runtime-corejs2/math/output.js
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
var _Math$trunc = require("@babel/runtime-corejs2/core-js/math/trunc");
|
||||||
|
|
||||||
|
var _Math$tanh = require("@babel/runtime-corejs2/core-js/math/tanh");
|
||||||
|
|
||||||
|
var _Math$sinh = require("@babel/runtime-corejs2/core-js/math/sinh");
|
||||||
|
|
||||||
|
var _Math$sign = require("@babel/runtime-corejs2/core-js/math/sign");
|
||||||
|
|
||||||
|
var _Math$log2 = require("@babel/runtime-corejs2/core-js/math/log2");
|
||||||
|
|
||||||
|
var _Math$log1p = require("@babel/runtime-corejs2/core-js/math/log1p");
|
||||||
|
|
||||||
|
var _Math$log = require("@babel/runtime-corejs2/core-js/math/log10");
|
||||||
|
|
||||||
|
var _Math$imul = require("@babel/runtime-corejs2/core-js/math/imul");
|
||||||
|
|
||||||
|
var _Math$hypot = require("@babel/runtime-corejs2/core-js/math/hypot");
|
||||||
|
|
||||||
|
var _Math$fround = require("@babel/runtime-corejs2/core-js/math/fround");
|
||||||
|
|
||||||
|
var _Math$expm = require("@babel/runtime-corejs2/core-js/math/expm1");
|
||||||
|
|
||||||
|
var _Math$cosh = require("@babel/runtime-corejs2/core-js/math/cosh");
|
||||||
|
|
||||||
|
var _Math$clz = require("@babel/runtime-corejs2/core-js/math/clz32");
|
||||||
|
|
||||||
|
var _Math$cbrt = require("@babel/runtime-corejs2/core-js/math/cbrt");
|
||||||
|
|
||||||
|
var _Math$atanh = require("@babel/runtime-corejs2/core-js/math/atanh");
|
||||||
|
|
||||||
|
var _Math$asinh = require("@babel/runtime-corejs2/core-js/math/asinh");
|
||||||
|
|
||||||
|
var _Math$acosh = require("@babel/runtime-corejs2/core-js/math/acosh");
|
||||||
|
|
||||||
|
_Math$acosh;
|
||||||
|
_Math$asinh;
|
||||||
|
_Math$atanh;
|
||||||
|
_Math$cbrt;
|
||||||
|
_Math$clz;
|
||||||
|
_Math$cosh;
|
||||||
|
_Math$expm;
|
||||||
|
_Math$fround;
|
||||||
|
_Math$hypot;
|
||||||
|
_Math$imul;
|
||||||
|
_Math$log;
|
||||||
|
_Math$log1p;
|
||||||
|
_Math$log2;
|
||||||
|
_Math$sign;
|
||||||
|
_Math$sinh;
|
||||||
|
_Math$tanh;
|
||||||
|
_Math$trunc;
|
||||||
Loading…
x
Reference in New Issue
Block a user