mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	
		
			
	
	
		
			16 lines
		
	
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			16 lines
		
	
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|   | test("basic functionality", () => { | ||
|  |     expect(DataView).toHaveLength(1); | ||
|  |     expect(DataView.name).toBe("DataView"); | ||
|  |     expect(DataView.prototype.constructor).toBe(DataView); | ||
|  | 
 | ||
|  |     const buffer = new ArrayBuffer(); | ||
|  |     expect(new DataView(buffer)).toBeInstanceOf(DataView); | ||
|  |     expect(typeof new DataView(buffer)).toBe("object"); | ||
|  | }); | ||
|  | 
 | ||
|  | test("DataView constructor must be invoked with 'new'", () => { | ||
|  |     expect(() => { | ||
|  |         DataView(); | ||
|  |     }).toThrowWithMessage(TypeError, "DataView constructor must be called with 'new'"); | ||
|  | }); |