mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-28 07:12:07 +00:00 
			
		
		
		
	 6255ca4a42
			
		
	
	
		6255ca4a42
		
	
	
	
	
		
			
			Since the async parts of the spec are not stage 3 at this point we don't add AsyncDisposableStack.
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			515 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			515 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("constructor properties", () => {
 | |
|     expect(DisposableStack).toHaveLength(0);
 | |
|     expect(DisposableStack.name).toBe("DisposableStack");
 | |
| });
 | |
| 
 | |
| describe("errors", () => {
 | |
|     test("called without new", () => {
 | |
|         expect(() => {
 | |
|             DisposableStack();
 | |
|         }).toThrowWithMessage(TypeError, "DisposableStack constructor must be called with 'new'");
 | |
|     });
 | |
| });
 | |
| 
 | |
| describe("normal behavior", () => {
 | |
|     test("typeof", () => {
 | |
|         expect(typeof new DisposableStack()).toBe("object");
 | |
|     });
 | |
| });
 |