Math.floor.js 387 B

12345678910111213
  1. test("basic functionality", () => {
  2. expect(Math.floor).toHaveLength(1);
  3. expect(Math.floor(0.95)).toBe(0);
  4. expect(Math.floor(4)).toBe(4);
  5. expect(Math.floor(7.004)).toBe(7);
  6. expect(Math.floor(-0.95)).toBe(-1);
  7. expect(Math.floor(-4)).toBe(-4);
  8. expect(Math.floor(-7.004)).toBe(-8);
  9. expect(Math.floor()).toBeNaN();
  10. expect(Math.floor(NaN)).toBeNaN();
  11. });