mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Run eslint tests with jest
Turns out eslint-tester works with jest (!) We take advantage of this internally at FB, so we'll do it here too. Fixes #4328
This commit is contained in:
@@ -114,7 +114,6 @@ module.exports = function(grunt) {
|
||||
]);
|
||||
grunt.registerTask('build:test', [
|
||||
'delete-build-modules',
|
||||
'test:eslint-rules',
|
||||
'jsx:test',
|
||||
'version-check',
|
||||
'populist:test',
|
||||
@@ -133,8 +132,6 @@ module.exports = function(grunt) {
|
||||
|
||||
grunt.registerTask('coverage:parse', require('./grunt/tasks/coverage-parse'));
|
||||
|
||||
grunt.registerTask('test:eslint-rules', require('./grunt/tasks/test-eslint-rules'));
|
||||
|
||||
grunt.registerTask('test:webdriver:phantomjs', [
|
||||
'connect',
|
||||
'webdriver-phantomjs',
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var grunt = require('grunt');
|
||||
|
||||
module.exports = function() {
|
||||
var done = this.async();
|
||||
grunt.util.spawn({
|
||||
cmd: 'node_modules/eslint-tester/node_modules/mocha/bin/mocha',
|
||||
args: ['eslint-rules/__tests__'],
|
||||
opts: {stdio: 'inherit'}, // allows colors to passthrough
|
||||
}, function(err, result, code) {
|
||||
if (err) {
|
||||
grunt.log.error('Custom linter rules are broken');
|
||||
} else {
|
||||
grunt.log.ok('Custom linter rules are okay');
|
||||
}
|
||||
|
||||
done(code === 0);
|
||||
});
|
||||
};
|
||||
+2
-1
@@ -95,7 +95,8 @@
|
||||
"/.module-cache/"
|
||||
],
|
||||
"testPathDirs": [
|
||||
"<rootDir>/src"
|
||||
"<rootDir>/src",
|
||||
"<rootDir>/eslint-rules"
|
||||
],
|
||||
"unmockedModulePathPatterns": [
|
||||
""
|
||||
|
||||
Reference in New Issue
Block a user