diff --git a/package.json b/package.json index eae77f7..cc39d2e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "prepublish": "npm run clean && npm run compile", "test": "npm run compile && npm run lint && atom --test build/test" }, + "atomTestRunner": "./test/runner", "dependencies": { "fuzzaldrin-plus": "^0.6.0", "vscode-jsonrpc": "4.0.0", @@ -21,6 +22,7 @@ "vscode-languageserver-types": "3.12.0" }, "devDependencies": { + "@smashwilson/atom-mocha-test-runner": "^1.4.0", "@types/atom": "^1.31.0", "@types/chai": "^4.1.7", "@types/fuzzaldrin-plus": "0.6.0", diff --git a/test/runner.js b/test/runner.js new file mode 100644 index 0000000..c23b88b --- /dev/null +++ b/test/runner.js @@ -0,0 +1,14 @@ +const { TestRunnerParams } = require("atom"); +const { createRunner } = require('@smashwilson/atom-mocha-test-runner'); + +module.exports = createRunner({ + htmlTitle: `atom-languageclient Tests - pid ${process.pid}`, + reporter: process.env.MOCHA_REPORTER || 'list', + }, + (mocha) => { + mocha.timeout(parseInt(process.env.MOCHA_TIMEOUT || '5000', 10)); + if (process.env.APPVEYOR_API_URL) { + mocha.reporter(require('mocha-appveyor-reporter')); + } + }, +);