mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			303 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			303 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("basic functionality", () => {
 | |
|     let p = new Proxy([], {
 | |
|         get(_, key) {
 | |
|             if (key === "length") return 3;
 | |
|             return Number(key);
 | |
|         },
 | |
|     });
 | |
| 
 | |
|     expect(JSON.stringify(p)).toBe("[0,1,2]");
 | |
|     expect(JSON.stringify([[new Proxy(p, {})]])).toBe("[[[0,1,2]]]");
 | |
| });
 | 
