mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 19:53:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			543 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			543 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Copyright (C) 2024 Jordan Harband. All rights reserved.
 | |
| // This code is governed by the BSD license found in the LICENSE file.
 | |
| 
 | |
| /*---
 | |
| description: Promise.try forwards arguments
 | |
| esid: sec-promise.try
 | |
| features: [promise-try]
 | |
| flags: [async]
 | |
| includes: [asyncHelpers.js, compareArray.js]
 | |
| ---*/
 | |
| 
 | |
| var sentinel = { sentinel: true };
 | |
| 
 | |
| asyncTest(function () {
 | |
|   return Promise.try(function () {
 | |
|     assert.compareArray(
 | |
|       Array.prototype.slice.call(arguments),
 | |
|       [1, 2, Test262Error, sentinel]
 | |
|     );
 | |
|   }, 1, 2, Test262Error, sentinel)
 | |
| });
 | |
| 
 |