From 854644f46cdc10387ef27399bbde7a61f835e9bf Mon Sep 17 00:00:00 2001 From: Andrej Ocenas Date: Mon, 18 Mar 2019 10:39:14 +0100 Subject: [PATCH 1/2] Add more patterns to no-only-test task --- scripts/grunt/default_task.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/grunt/default_task.js b/scripts/grunt/default_task.js index 8a71ea26627..a656e0c60af 100644 --- a/scripts/grunt/default_task.js +++ b/scripts/grunt/default_task.js @@ -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); } }); }); From dcc5373e770035035889d55c0a543eea59ed26c8 Mon Sep 17 00:00:00 2001 From: Andrej Ocenas Date: Mon, 18 Mar 2019 10:40:04 +0100 Subject: [PATCH 2/2] Remove .only function --- .../src/components/ThresholdsEditor/ThresholdsEditor.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx index ea94537c429..38cd8e5c763 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx +++ b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx @@ -161,7 +161,7 @@ describe('change threshold value', () => { }); describe('on blur threshold value', () => { - it.only('should resort rows and update indexes', () => { + it('should resort rows and update indexes', () => { const { instance } = setup(); const thresholds = [ { index: 0, value: -Infinity, color: '#7EB26D' },