mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add more patterns to no-only-test task
This commit is contained in:
parent
d1e48a07b2
commit
854644f46c
@ -34,14 +34,17 @@ module.exports = function (grunt) {
|
||||
]);
|
||||
|
||||
grunt.registerTask('no-only-tests', function () {
|
||||
var files = grunt.file.expand('public/**/*_specs\.ts', 'public/**/*_specs\.js');
|
||||
var files = grunt.file.expand(
|
||||
'public/**/*@(_specs|\.test)\.@(ts|js|tsx|jsx)',
|
||||
'packages/grafana-ui/**/*@(_specs|\.test)\.@(ts|js|tsx|jsx)'
|
||||
);
|
||||
|
||||
files.forEach(function (spec) {
|
||||
var rows = grunt.file.read(spec).split('\n');
|
||||
rows.forEach(function (row) {
|
||||
if (row.indexOf('.only(') > 0) {
|
||||
grunt.log.errorlns(row);
|
||||
grunt.fail.warn('found only statement in test: ' + spec)
|
||||
grunt.fail.warn('found only statement in test: ' + spec);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user