Skip to content

Commit

Permalink
labels: add more async_hooks support (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex authored and phillipj committed May 14, 2017
1 parent f791b50 commit 66eb55f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/node-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const subSystemLabelsMap = new Map([
])

const jsSubsystemList = [
'debugger', 'assert', 'buffer', 'child_process', 'cluster', 'console',
'debugger', 'assert', 'async_hooks', 'buffer', 'child_process', 'cluster', 'console',
'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'module',
'net', 'os', 'path', 'process', 'querystring', 'readline', 'repl', 'stream',
'string_decoder', 'timers', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib'
Expand All @@ -111,6 +111,7 @@ const exclusiveLabelsMap = new Map([
[/^test\/cctest\/test_url/, ['test', 'url-whatwg',
'dont-land-on-v4.x', 'dont-land-on-v6.x']],
[/^test\/addons-napi\//, ['test', 'n-api']],
[/^test\/async-hooks\//, ['test', 'async_hooks']],

[/^test\//, 'test'],

Expand Down
17 changes: 17 additions & 0 deletions test/unit/node-labels.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,23 @@ for (const info of specificTools) {

t.same(resolved, labels)

t.end()
})
}
});

[
[ ['async_hooks'], ['lib/async_hooks.js'] ],
[ ['test', 'async_hooks'], ['test/async-hooks/test-connection.ssl.js'] ]
].forEach((info) => {
const labels = info[0]
const files = info[1]
for (const file of files) {
tap.test(`label: "${labels.join('","')}" when ./${file} has been changed`, (t) => {
const resolved = nodeLabels.resolveLabels([file])

t.same(resolved, labels)

t.end()
})
}
Expand Down

0 comments on commit 66eb55f

Please sign in to comment.