-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27691d8
commit 95ae286
Showing
5 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,6 @@ node_js: | |
git: | ||
depth: 5 | ||
|
||
cache: yarn | ||
|
||
notifications: | ||
irc: | ||
use_notice: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use strict'; | ||
|
||
const log = require('why-is-node-running') | ||
// const {createHook} = require('async_hooks'); | ||
// const {stackTraceFilter} = require('mocha/lib/utils'); | ||
// const allResources = new Map(); | ||
|
||
// this will pull Mocha internals out of the stacks | ||
// const filterStack = stackTraceFilter(); | ||
|
||
// const hook = createHook({ | ||
// init(asyncId, type, triggerAsyncId) { | ||
// allResources.set(asyncId, {type, triggerAsyncId, stack: (new Error()).stack}); | ||
// }, | ||
// destroy(asyncId) { | ||
// allResources.delete(asyncId); | ||
// } | ||
// }).enable(); | ||
|
||
global.asyncDump = module.exports = () => { | ||
//hook.disable(); | ||
console.error(` | ||
STUFF STILL IN THE EVENT LOOP:`) | ||
// allResources.forEach(value=> { | ||
// console.error(`Type: ${value.type}`); | ||
// console.error(filterStack(value.stack)); | ||
// console.error('\n'); | ||
// }); | ||
setTimeout(function () { | ||
log() // logs out active handles that are keeping node running | ||
}, 100) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
after(function () { | ||
global.asyncDump(); | ||
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters