@samitouri / QOS-React-2 / commits / 84f8df1f89

Track fiber tests (#7812)

Use the newly added tracking system to track the number of fiber tests that are passing/failing. I first tried to modify the grunt lint rule for it and send the output in stdout but unfortunately grunt displays the rule + done messages there. I had like 30 lines of js already and I figured I could just write 3 lines of bash and it would work the same. Let me know if you want me to use another approach for it. Test Plan: Run the commands that have been introduced in this commit but the facts-tracker one Run `echo $FIBER_TESTS` and make sure it prints `666/1434`

Christopher Chedeau committed Sep 26, 2016 at 14:54 UTC 84f8df1f891285b8ff85880631d7882c30b2ced3
1 file changed +16
.travis.yml
+16
@@ -73,11 +73,27 @@ script:
73 set -e
74 ./node_modules/.bin/grunt jest:coverage
75 cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
76 +
77 echo 'Testing in server-render (HTML generation) mode...'
78 printf '\nmodule.exports.useCreateElement = false;\n' \
79 >> src/renderers/dom/shared/ReactDOMFeatureFlags.js
80 ./node_modules/.bin/grunt jest:normal
81 git checkout -- src/renderers/dom/shared/ReactDOMFeatureFlags.js
82 +
83 + echo 'Testing in fiber mode...'
84 + printf '\nmodule.exports.useFiber = true;\n' \
85 + >> src/renderers/dom/shared/ReactDOMFeatureFlags.js
86 + FIBER_TESTS=`\
87 + NODE_ENV=test node node_modules/jest/bin/jest --json | \
88 + node -e "\
89 + var data = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf8')); \
90 + console.log(data.numPassedTests + '/' + data.numTotalTests)\
91 + "\
92 + `
93 + git checkout -- src/renderers/dom/shared/ReactDOMFeatureFlags.js
94 + node scripts/facts-tracker/index.js \
95 + "fiber-tests" "$FIBER_TESTS"
96 +
97 ./node_modules/.bin/gulp react:extract-errors
98 elif [ "$TEST_TYPE" = flow ]; then
99 set -e