Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit e27bb43

Browse files
author
Winston Liu
authored
Merge pull request #256 from atom/wl-fix-test-command
Make npm test run tests
2 parents cc8975d + 2d3813b commit e27bb43

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
"prepublish": "npm run clean && npm run compile",
1515
"test": "npm run compile && npm run lint && atom --test build/test"
1616
},
17+
"atomTestRunner": "./test/runner",
1718
"dependencies": {
1819
"fuzzaldrin-plus": "^0.6.0",
1920
"vscode-jsonrpc": "4.0.0",
2021
"vscode-languageserver-protocol": "3.12.0",
2122
"vscode-languageserver-types": "3.12.0"
2223
},
2324
"devDependencies": {
25+
"@smashwilson/atom-mocha-test-runner": "^1.4.0",
2426
"@types/atom": "^1.31.0",
2527
"@types/chai": "^4.1.7",
2628
"@types/fuzzaldrin-plus": "0.6.0",

test/runner.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { TestRunnerParams } = require("atom");
2+
const { createRunner } = require('@smashwilson/atom-mocha-test-runner');
3+
4+
module.exports = createRunner({
5+
htmlTitle: `atom-languageclient Tests - pid ${process.pid}`,
6+
reporter: process.env.MOCHA_REPORTER || 'list',
7+
},
8+
(mocha) => {
9+
mocha.timeout(parseInt(process.env.MOCHA_TIMEOUT || '5000', 10));
10+
if (process.env.APPVEYOR_API_URL) {
11+
mocha.reporter(require('mocha-appveyor-reporter'));
12+
}
13+
},
14+
);

0 commit comments

Comments
 (0)