mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	 90820873a2
			
		
	
	
		90820873a2
		
	
	
	
	
		
			
			And the simple Temporal.Instant.prototype getters, so that the constructed Temporal.Instant may actually be validated.
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			505 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			505 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| describe("correct behavior", () => {
 | |
|     test("length is 2", () => {
 | |
|         expect(Temporal.Instant.compare).toHaveLength(2);
 | |
|     });
 | |
| 
 | |
|     test("basic functionality", () => {
 | |
|         const instant1 = new Temporal.Instant(111n);
 | |
|         expect(Temporal.Instant.compare(instant1, instant1)).toBe(0);
 | |
|         const instant2 = new Temporal.Instant(999n);
 | |
|         expect(Temporal.Instant.compare(instant1, instant2)).toBe(-1);
 | |
|         expect(Temporal.Instant.compare(instant2, instant1)).toBe(1);
 | |
|     });
 | |
| });
 |