mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:12:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 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'");
 | |
| });
 | 
