Skip to content

Commit f3afccd

Browse files
committed
migrate to vscode-test
1 parent 201a0d8 commit f3afccd

30 files changed

+78
-33
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
* text=auto
2-
/src/test/testfiles/nix/**/*.confluence text eol=lf
3-
/src/test/testfiles/win/**/*.confluence text eol=crlf
2+
**/nix/**/*.confluence text eol=lf
3+
**/win/**/*.confluence text eol=crlf

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "confluence-markup",
33
"displayName": "Confluence markup",
4-
"version": "0.1.8",
4+
"version": "0.1.9",
55
"publisher": "denco",
66
"description": "Confluence markup language support for Visual Studio Code",
77
"keywords": [
@@ -124,19 +124,24 @@
124124
"vscode:prepublish": "npm run compile",
125125
"compile": "tsc -p ./",
126126
"watch": "tsc -watch -p ./",
127-
"postinstall": "node ./node_modules/vscode/bin/install",
128-
"test": "npm run clean && npm run compile && node ./node_modules/vscode/bin/test",
127+
"pretest": "npm run clean && npm run compile",
128+
"test": "node ./out/test/runTest.js",
129129
"package": "./node_modules/.bin/vsce package",
130130
"clean": "rm -rf ./out",
131131
"clean-all": "rm -f ./confluence-markup*.vsix; rm -rf ./.vscode-test; rm -rf ./out; rm -rf ./node_modules"
132132
},
133133
"devDependencies": {
134+
"@types/glob": "^7.1.1",
134135
"@types/mocha": "^5.2.7",
135136
"@types/node": "^12.12.7",
137+
"@types/vscode": "^1.40.0",
136138
"tslint": "^5.18.0",
137139
"typescript": "^3.5.3",
138140
"vsce": "^1.66.0",
139-
"vscode": "^1.1.36",
141+
"vscode-test": "^1.2.3",
142+
"glob": "^7.1.4",
143+
"mocha": "^6.1.4",
144+
"source-map-support": "^0.5.12",
140145
"html-formatter": "^0.1.9"
141146
},
142147
"__metadata": {

src/test/index.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/test/runTest.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
import * as path from 'path';
3+
4+
import { runTests } from 'vscode-test';
5+
6+
async function main() {
7+
try {
8+
// The folder containing the Extension Manifest package.json
9+
// Passed to `--extensionDevelopmentPath`
10+
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
11+
12+
// The path to the extension test script
13+
// Passed to --extensionTestsPath
14+
const extensionTestsPath = path.resolve(__dirname, './suite/index');
15+
16+
// Download VS Code, unzip it and run the integration test
17+
await runTests({ extensionDevelopmentPath, extensionTestsPath });
18+
} catch (err) {
19+
console.error('Failed to run tests');
20+
process.exit(1);
21+
}
22+
}
23+
24+
main();
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)