Skip to content

Commit 3aa047d

Browse files
author
Danny McCormick
committed
Added initial set of tests for vsoClient
1 parent 8699c48 commit 3aa047d

10 files changed

Lines changed: 597 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ $ npm run build
1313

1414
## Test
1515

16-
You should test with node 4.x, 6.x and 8.x LTS. We recommend using nvm ([linux](https://github.com/creationix/nvm) / [windows](https://github.com/coreybutler/nvm-windows))
16+
You should test with node 4.x, 6.x and 8.x LTS. We recommend using nvm ([linux](https://github.com/creationix/nvm) / [windows](https://github.com/coreybutler/nvm-windows)). To run units:
17+
18+
```
19+
npm units
20+
```
21+
22+
To run all tests:
1723

1824
```
1925
npm test

make.js

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,32 @@ target.build = function() {
4040
rm(path.join(buildPath, 'index.*'));
4141
}
4242

43-
// test is just building samples
43+
44+
target.units = function() {
45+
pushd('test')
46+
run('npm install ../_build');
47+
popd();
48+
49+
console.log("-------Unit Tests-------");
50+
run('tsc -p ./test/units');
51+
run('mocha test/units');
52+
}
53+
4454
target.test = function() {
55+
pushd('test')
56+
run('npm install ../_build');
57+
popd();
58+
59+
console.log("-------Unit Tests-------");
60+
run('tsc -p ./test/units');
61+
run('mocha test/units');
62+
63+
console.log("-------Other Tests-------");
64+
run('tsc -p ./test/tests');
65+
run('mocha test/tests');
66+
}
67+
68+
target.samples = function() {
4569
target.build();
4670

4771
var modPath = path.join(__dirname, 'samples', 'node_modules');
@@ -51,10 +75,6 @@ target.test = function() {
5175
run('npm install ../_build');
5276
popd();
5377
run('tsc -p samples');
54-
}
55-
56-
target.samples = function() {
57-
target.test();
5878

5979
pushd('samples');
6080
run('node run.js');

0 commit comments

Comments
 (0)