From 1ba022b1ea2546d9cab19ab99f1bd1f86baf6ded Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Sat, 30 Aug 2014 01:08:57 -0700 Subject: [PATCH] Include vendor/ when running jest tests Now the two transform tests get run alongside the React core tests. Test Plan: jest --- package.json | 12 ++++++------ vendor/fbtransform/syntax.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 11c377087b..96bc4645a9 100644 --- a/package.json +++ b/package.json @@ -79,11 +79,11 @@ "jest": "jest" }, "jest": { - "rootDir": "src", - "scriptPreprocessor": "../jest/preprocessor.js", - "setupEnvScriptFile": "../jest/environment.js", - "unmockedModulePathPatterns": [ - "" - ] + "rootDir": "", + "scriptPreprocessor": "jest/preprocessor.js", + "setupEnvScriptFile": "jest/environment.js", + "modulePathIgnorePatterns": ["/build/", "/node_modules/"], + "testPathIgnorePatterns": ["/build/", "/node_modules/"], + "unmockedModulePathPatterns": [""] } } diff --git a/vendor/fbtransform/syntax.js b/vendor/fbtransform/syntax.js index 4c39ca0ac8..e3dcefe8bc 100644 --- a/vendor/fbtransform/syntax.js +++ b/vendor/fbtransform/syntax.js @@ -18,7 +18,7 @@ function transformAll(source, options, excludes) { // The typechecker transform must run in a second pass in order to operate on // the entire source code -- so exclude it from the first pass - var visitorsList = visitors.getVisitorsList(excludes.concat('typechecker')); + var visitorsList = visitors.getAllVisitors(excludes.concat('typechecker')); source = transform(visitorsList, source, options); if (excludes.indexOf('typechecks') == -1 && /@typechecks/.test(source.code)) { source = transform(