mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 06:22:21 +08:00

* tech: investigating karma + jest mix * tech: migrating tests to jest * tech: moved anoter test file to jest * test: migrated two more test files to jest * test: updated readme and made test fail to verify that it causes CI build failure * tech: added code coverage for jest tests * tech: testing codecov coverage * tech: migrated more tests * tech: migrated template srv to typescript and the tests to jest * tech: minor build fix * tech: build fixes * build: another attempt at fixing go test with coverage
36 lines
782 B
JavaScript
36 lines
782 B
JavaScript
// Lint and build CSS
|
|
module.exports = function(grunt) {
|
|
'use strict';
|
|
|
|
grunt.registerTask('default', [
|
|
'clean:build',
|
|
'phantomjs',
|
|
'webpack:dev',
|
|
]);
|
|
|
|
grunt.registerTask('test', [
|
|
'clean:build',
|
|
'jscs',
|
|
'jshint',
|
|
'sasslint',
|
|
'exec:tslint',
|
|
"exec:jest",
|
|
'karma:test',
|
|
'no-only-tests'
|
|
]);
|
|
|
|
grunt.registerTask('no-only-tests', function() {
|
|
var files = grunt.file.expand('public/**/*_specs\.ts', 'public/**/*_specs\.js');
|
|
|
|
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)
|
|
}
|
|
});
|
|
});
|
|
});
|
|
};
|