mirror of
				https://github.com/actions/setup-java.git
				synced 2025-10-31 14:30:53 +00:00 
			
		
		
		
	Fix.
This commit is contained in:
		
					parent
					
						
							
								596a6da241
							
						
					
				
			
			
				commit
				
					
						c1a589c5b6
					
				
			
		
					 7078 changed files with 1882834 additions and 319 deletions
				
			
		
							
								
								
									
										60
									
								
								node_modules/es-abstract/test/helpers/assertRecord.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								node_modules/es-abstract/test/helpers/assertRecord.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,60 @@ | |||
| 'use strict'; | ||||
| 
 | ||||
| var forEach = require('foreach'); | ||||
| var debug = require('object-inspect'); | ||||
| 
 | ||||
| var assertRecord = require('../../helpers/assertRecord'); | ||||
| var v = require('./values'); | ||||
| 
 | ||||
| module.exports = function assertRecordTests(ES, test) { | ||||
|   test('Property Descriptor', function (t) { | ||||
|     var record = 'Property Descriptor'; | ||||
| 
 | ||||
|     forEach(v.nonUndefinedPrimitives, function (primitive) { | ||||
|       t['throws']( | ||||
|         function () { assertRecord(ES, record, 'arg', primitive); }, | ||||
|         TypeError, | ||||
|         debug(primitive) + ' is not a Property Descriptor' | ||||
|       ); | ||||
|     }); | ||||
| 
 | ||||
|     t['throws']( | ||||
|       function () { assertRecord(ES, record, 'arg', { invalid: true }); }, | ||||
|       TypeError, | ||||
|       'invalid keys not allowed on a Property Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t.doesNotThrow( | ||||
|       function () { assertRecord(ES, record, 'arg', {}); }, | ||||
|       'empty object is an incomplete Property Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t.doesNotThrow( | ||||
|       function () { assertRecord(ES, record, 'arg', v.accessorDescriptor()); }, | ||||
|       'accessor descriptor is a Property Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t.doesNotThrow( | ||||
|       function () { assertRecord(ES, record, 'arg', v.mutatorDescriptor()); }, | ||||
|       'mutator descriptor is a Property Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t.doesNotThrow( | ||||
|       function () { assertRecord(ES, record, 'arg', v.dataDescriptor()); }, | ||||
|       'data descriptor is a Property Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t.doesNotThrow( | ||||
|       function () { assertRecord(ES, record, 'arg', v.genericDescriptor()); }, | ||||
|       'generic descriptor is a Property Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t['throws']( | ||||
|       function () { assertRecord(ES, record, 'arg', v.bothDescriptor()); }, | ||||
|       TypeError, | ||||
|       'a Property Descriptor can not be both a Data and an Accessor Descriptor' | ||||
|     ); | ||||
| 
 | ||||
|     t.end(); | ||||
|   }); | ||||
| }; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue