@@ -321,8 +321,8 @@ module.exports = {
321
321
* Load the plugin on the tracer with an optional config and start a mock agent.
322
322
*
323
323
* @param {String|Array<String> } pluginName - Name or list of names of plugins to load
324
- * @param {Record<string, unknown> } config
325
- * @param {Record<string, unknown> } tracerConfig
324
+ * @param {Record<string, unknown> } [ config]
325
+ * @param {Record<string, unknown> } [ tracerConfig={}]
326
326
* @returns Promise<void>
327
327
*/
328
328
async load ( pluginName , config , tracerConfig = { } ) {
@@ -521,19 +521,18 @@ module.exports = {
521
521
522
522
/**
523
523
* Stop the mock agent, reset all expectations and wipe the require cache.
524
- * @param {Object } opts
525
- * @param {boolean } opts.ritmReset - Resets the Require In The Middle cache. You probably don't need this.
526
- * @param {boolean } opts.wipe - Wipes tracer and non-native modules from require cache. You probably don't need this.
524
+ * @param {Object } [options]
525
+ * @param {boolean } [options.ritmReset=true] - Resets the Require In The Middle cache. You probably don't need this.
526
+ * @param {boolean } [options.wipe=false] - Wipes tracer and non-native modules from require cache. You probably don't
527
+ * need this.
527
528
* @returns
528
529
*/
529
- close ( opts = { } ) {
530
+ close ( { ritmReset = true , wipe = false } = { } ) {
530
531
// Allow close to be called idempotent
531
532
if ( listener === null ) {
532
533
return Promise . resolve ( )
533
534
}
534
535
535
- const { ritmReset, wipe } = opts
536
-
537
536
listener . close ( )
538
537
listener = null
539
538
sockets . forEach ( socket => socket . end ( ) )
0 commit comments