mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			502 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			502 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
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();
 | 
						|
});
 |