Skip to content

Commit 239bc71

Browse files
committed
Merge pull request #55 from stkb/tests-misc-fixes
Misc improvements to testing infrastructure
2 parents d563cc1 + ffe4672 commit 239bc71

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
tests/generated/*
22
tests/node_modules
3+
tests/typings/
34
tests/*.js

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@ This repository contains TmLanguage files that are consumed by TypeScript editor
55
# Contributing
66

77
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by the [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) plugin.
8+
9+
## Tests
10+
11+
Test are run from within the ```tests``` folder
12+
13+
``` sh
14+
cd tests
15+
npm install # Installs dependencies required for testing
16+
npm test # Compiles & runs tests
17+
```

appveyor.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Test against this version of Node.js
2+
environment:
3+
nodejs_version: "4"
4+
5+
# Install scripts. (runs after repo cloning)
6+
install:
7+
- ps: Install-Product node $env:nodejs_version
8+
- node --version
9+
- npm --version
10+
- cd tests
11+
- npm install
12+
- npm test
13+
14+
# Don't actually build.
15+
build: off

tests/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
{
22
"name": "tests",
33
"version": "1.0.0",
4+
"private": true,
45
"description": "",
56
"main": "test.ts",
67
"scripts": {
7-
"pretest": "./node_modules/.bin/tsc && node ./build.js",
8-
"test": "./node_modules/.bin/mocha test.js"
8+
"postinstall": "tsd install",
9+
"pretest": "tsc && node ./build.js",
10+
"test": "mocha test.js"
911
},
1012
"dependencies": {
1113
"chai": "^3.4.1",
1214
"mocha": "^2.3.4",
1315
"typescript": "^1.6.2",
1416
"vscode-textmate": "^1.0.6"
17+
},
18+
"devDependencies": {
19+
"tsd": "^0.6.5"
1520
}
1621
}

0 commit comments

Comments
 (0)