blob: f5434d94c7a6a620c9ec28775e5a966b8dce52ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
test("basic functionality", () => {
expect(Math.sin).toHaveLength(1);
expect(Math.sin(0)).toBe(0);
expect(Math.sin(null)).toBe(0);
expect(Math.sin("")).toBe(0);
expect(Math.sin([])).toBe(0);
expect(Math.sin((Math.PI * 3) / 2)).toBe(-1);
expect(Math.sin(Math.PI / 2)).toBe(1);
expect(Math.sin()).toBeNaN();
expect(Math.sin(undefined)).toBeNaN();
expect(Math.sin([1, 2, 3])).toBeNaN();
expect(Math.sin({})).toBeNaN();
expect(Math.sin("foo")).toBeNaN();
});
|