mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:02:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			440 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			440 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("basic functionality", () => {
 | |
|     expect(Math.abs).toHaveLength(1);
 | |
| 
 | |
|     expect(Math.abs("-1")).toBe(1);
 | |
|     expect(Math.abs(-2)).toBe(2);
 | |
|     expect(Math.abs(null)).toBe(0);
 | |
|     expect(Math.abs("")).toBe(0);
 | |
|     expect(Math.abs([])).toBe(0);
 | |
|     expect(Math.abs([2])).toBe(2);
 | |
|     expect(Math.abs([1, 2])).toBeNaN();
 | |
|     expect(Math.abs({})).toBeNaN();
 | |
|     expect(Math.abs("string")).toBeNaN();
 | |
|     expect(Math.abs()).toBeNaN();
 | |
| });
 | 
