Skip to content

Commit 46c3409

Browse files
committed
labels: fix lib/src bucket for src/ changes
1 parent 932b06b commit 46c3409

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

test/unit/node-labels.test.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,39 @@ tap.test('label: "lib / src" when 5 or more JS sub-systems have been changed', (
235235
t.end()
236236
})
237237

238+
// https://github.com/nodejs/node/pull/12366 should have been labelled "lib / src"
239+
// https://github.com/nodejs/github-bot/issues/137
240+
tap.test('label: "lib / src" when 5 or more native files have been changed', (t) => {
241+
const labels = nodeLabels.resolveLabels([
242+
'node.gyp',
243+
'src/cares_wrap.cc',
244+
'src/fs_event_wrap.cc',
245+
'src/node.cc',
246+
'src/node_api.cc',
247+
'src/node_buffer.cc',
248+
'src/node_config.cc',
249+
'src/node_constants.cc',
250+
'src/node_contextify.cc',
251+
'src/node_file.cc',
252+
'src/node_file.h',
253+
'src/node_http_parser.cc',
254+
'src/node_http_parser.h',
255+
'src/node_i18n.cc',
256+
'src/node_revert.cc',
257+
'src/node_serdes.cc',
258+
'src/node_zlib.cc',
259+
'src/process_wrap.cc',
260+
'src/signal_wrap.cc',
261+
'src/string_bytes.cc',
262+
'src/timer_wrap.cc',
263+
'src/uv.cc'
264+
])
265+
266+
t.same(labels, ['lib / src'])
267+
268+
t.end()
269+
})
270+
238271
// https://github.com/nodejs/node/pull/7488 wrongfully labelled with "lib / src"
239272
tap.test('label: not "lib / src" when only deps have been changed', (t) => {
240273
const labels = nodeLabels.resolveLabels([

0 commit comments

Comments
 (0)