From 8266f61d27c8f346be820a71474926715e400f63 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Mon, 30 Oct 2017 13:29:34 +0300 Subject: [PATCH] add test task as npm script --- Gruntfile.js | 8 ++++++++ package.json | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 548f742..05c3a14 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -193,6 +193,14 @@ module.exports = function(grunt) { 'jscs' ]); + grunt.registerTask('test', [ + 'clean:test', + 'clean:tmp', + 'babel:distTestNoSystemJs', + 'babel:distTestsSpecsNoSystemJs', + 'mochaTest' + ]); + grunt.registerTask('bench', [ 'clean:test', 'clean:tmp', diff --git a/package.json b/package.json index 6810d86..50a5ce7 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "version": "3.6.0", "description": "Zabbix plugin for Grafana", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "./node_modules/.bin/grunt" + "test": "./node_modules/.bin/grunt test", + "build": "./node_modules/.bin/grunt", + "watch": "./node_modules/.bin/grunt watch" }, "repository": { "type": "git",