zarm
Version:
基于 React 的移动端UI库
12 lines (10 loc) • 738 B
JavaScript
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
var _templateObject;
import getPrecision from '../../utils/getPrecision';
describe('#getPrecision', function () {
it.each(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n step | expected\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n "])), 2.3, 1, 3.0, 0, 1, 0, 3.222, 3, 3.002, 3, 0.002, 3, NaN, 0, Infinity, 0)('precision should be $expected when step = $step', function (_ref) {
var step = _ref.step,
expected = _ref.expected;
expect(getPrecision(step)).toEqual(expected);
});
});