diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..17cf835 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - "node" +script: + - echo "installation npm" + - npm install + - echo "npm test" + - npm test + - echo "instalation jshint" + - npm install jshint --save-dev + - echo "test style" + - node_modules/.bin/jshint src diff --git a/package.json b/package.json index 5d910d5..12ffbfb 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "author": "", "license": "ISC", "devDependencies": { + "jshint": "^2.9.6", "mocha": "^5.2.0" } } diff --git a/src/testCase.js b/src/testCase.js index d466423..12eb136 100644 --- a/src/testCase.js +++ b/src/testCase.js @@ -1,3 +1,5 @@ +/*jshint esversion: 6*/ +"use strict"; class testCase { constructor(json) { this.json = json; @@ -17,7 +19,11 @@ class testCase { // TODO but not like this : https://www.monkeyuser.com/2017/todo/ getExecutions(){ - return null; + var obj = JSON.parse(this.json); + if (undefined !== obj.executions && Array.isArray(obj.executions)){ + return obj.executions; + } + return false; } }