2020-07-04 10:09:48 -07:00
|
|
|
test("basic functionality", () => {
|
2020-07-06 07:37:45 -07:00
|
|
|
expect(Math.cos).toHaveLength(1);
|
2020-04-13 10:31:13 -07:00
|
|
|
|
2020-07-06 07:37:45 -07:00
|
|
|
expect(Math.cos(0)).toBe(1);
|
|
|
|
|
expect(Math.cos(null)).toBe(1);
|
|
|
|
|
expect(Math.cos("")).toBe(1);
|
|
|
|
|
expect(Math.cos([])).toBe(1);
|
|
|
|
|
expect(Math.cos(Math.PI)).toBe(-1);
|
|
|
|
|
expect(Math.cos()).toBeNaN();
|
|
|
|
|
expect(Math.cos(undefined)).toBeNaN();
|
|
|
|
|
expect(Math.cos([1, 2, 3])).toBeNaN();
|
|
|
|
|
expect(Math.cos({})).toBeNaN();
|
|
|
|
|
expect(Math.cos("foo")).toBeNaN();
|
2022-08-10 11:57:46 +02:00
|
|
|
expect(Math.cos(-Infinity)).toBeNaN();
|
|
|
|
|
expect(Math.cos(Infinity)).toBeNaN();
|
2020-07-04 10:09:48 -07:00
|
|
|
});
|