From 46c3409c77ac6b4513bb42b853fa3c53590001f7 Mon Sep 17 00:00:00 2001 From: Phillip Johnsen Date: Sat, 6 May 2017 13:39:22 +0200 Subject: [PATCH] labels: fix lib/src bucket for src/ changes --- test/unit/node-labels.test.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/unit/node-labels.test.js b/test/unit/node-labels.test.js index 892c8df3..16740d30 100644 --- a/test/unit/node-labels.test.js +++ b/test/unit/node-labels.test.js @@ -235,6 +235,39 @@ tap.test('label: "lib / src" when 5 or more JS sub-systems have been changed', ( t.end() }) +// https://github.com/nodejs/node/pull/12366 should have been labelled "lib / src" +// https://github.com/nodejs/github-bot/issues/137 +tap.test('label: "lib / src" when 5 or more native files have been changed', (t) => { + const labels = nodeLabels.resolveLabels([ + 'node.gyp', + 'src/cares_wrap.cc', + 'src/fs_event_wrap.cc', + 'src/node.cc', + 'src/node_api.cc', + 'src/node_buffer.cc', + 'src/node_config.cc', + 'src/node_constants.cc', + 'src/node_contextify.cc', + 'src/node_file.cc', + 'src/node_file.h', + 'src/node_http_parser.cc', + 'src/node_http_parser.h', + 'src/node_i18n.cc', + 'src/node_revert.cc', + 'src/node_serdes.cc', + 'src/node_zlib.cc', + 'src/process_wrap.cc', + 'src/signal_wrap.cc', + 'src/string_bytes.cc', + 'src/timer_wrap.cc', + 'src/uv.cc' + ]) + + t.same(labels, ['lib / src']) + + t.end() +}) + // https://github.com/nodejs/node/pull/7488 wrongfully labelled with "lib / src" tap.test('label: not "lib / src" when only deps have been changed', (t) => { const labels = nodeLabels.resolveLabels([