diff --git a/packages/tinytest/tinytest.js b/packages/tinytest/tinytest.js index d2a76a9fd6..60c0bbdc90 100644 --- a/packages/tinytest/tinytest.js +++ b/packages/tinytest/tinytest.js @@ -404,6 +404,10 @@ _.extend(TestManager.prototype, { throw new Error( "Every test needs a unique name, but there are two tests named '" + test.name + "'"); + if (process.env.TINYTEST_FILTER && + test.name.indexOf(process.env.TINYTEST_FILTER) === -1) { + return; + } self.tests[test.name] = test; self.ordered_tests.push(test); },