You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					24 lines
				
				354 B
			
		
		
			
		
	
	
					24 lines
				
				354 B
			| 
											3 years ago
										 | 'use strict' | ||
|  | 
 | ||
|  | const t = require('tap') | ||
|  | const { register, unregister } = require('..') | ||
|  | 
 | ||
|  | process.on('warning', () => { | ||
|  |   t.fail('warning emitted') | ||
|  | }) | ||
|  | 
 | ||
|  | const objs = [] | ||
|  | for (let i = 0; i < 20; i++) { | ||
|  |   const obj = { i } | ||
|  |   objs.push(obj) | ||
|  |   register(obj, shutdown) | ||
|  | } | ||
|  | 
 | ||
|  | for (const obj of objs) { | ||
|  |   unregister(obj) | ||
|  | } | ||
|  | 
 | ||
|  | t.pass('completed') | ||
|  | 
 | ||
|  | function shutdown () {} |