diff --git a/package.json b/package.json index 4ec1a36f5..122ca99bf 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "node": ">=4" }, "scripts": { - "test": "xo && flow check && nyc tap --no-cov --timeout=150 --jobs=4 test/*.js test/reporters/*.js", + "test": "xo && flow check test/flow-types && nyc tap --no-cov --timeout=150 --jobs=4 test/*.js test/reporters/*.js", "test-win": "tap --no-cov --reporter=classic --timeout=150 --jobs=4 test/*.js test/reporters/*.js", "visual": "node test/visual/run-visual-tests.js", "prepublish": "npm run make-ts", diff --git a/.flowconfig b/test/flow-types/.flowconfig similarity index 51% rename from .flowconfig rename to test/flow-types/.flowconfig index d0c7084f7..23066fc9c 100644 --- a/.flowconfig +++ b/test/flow-types/.flowconfig @@ -1,6 +1,5 @@ -[ignore] -/node_modules/.* -/.*\.js$ +[include] +../../*.js.flow$ [options] emoji=true diff --git a/test/flow-types/regression-1114.js.flow b/test/flow-types/regression-1114.js.flow index 60101316d..616668dbf 100644 --- a/test/flow-types/regression-1114.js.flow +++ b/test/flow-types/regression-1114.js.flow @@ -1,6 +1,6 @@ /* @flow */ -const test = require('../../'); +const test = require('../../index.js.flow'); test('Named test', t => { t.pass('Success'); diff --git a/test/flow-types/regression-1148.js.flow b/test/flow-types/regression-1148.js.flow index feb279f8e..f08f65dcf 100644 --- a/test/flow-types/regression-1148.js.flow +++ b/test/flow-types/regression-1148.js.flow @@ -1,6 +1,6 @@ /* @flow */ -const test = require('../../'); +const test = require('../../index.js.flow'); test(t => { t.throws(() => { throw new Error(); });