dist-javascript-algorithms-and-data-structures
Version:
Algorithms and data-structures implemented on JavaScript
16 lines (13 loc) • 657 B
JavaScript
;
var _degreeToRadian = _interopRequireDefault(require("../degreeToRadian"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
describe('degreeToRadian', () => {
it('should convert degree to radian', () => {
expect((0, _degreeToRadian.default)(0)).toBe(0);
expect((0, _degreeToRadian.default)(45)).toBe(Math.PI / 4);
expect((0, _degreeToRadian.default)(90)).toBe(Math.PI / 2);
expect((0, _degreeToRadian.default)(180)).toBe(Math.PI);
expect((0, _degreeToRadian.default)(270)).toBe(3 * Math.PI / 2);
expect((0, _degreeToRadian.default)(360)).toBe(2 * Math.PI);
});
});