Skip to content

Commit e88c657

Browse files
author
damccorm
authored
Merge pull request #218 from damccorm/issue-217
Added initial set of tests for vsoClient
2 parents d759b18 + e00d502 commit e88c657

File tree

9 files changed

+607
-8
lines changed

9 files changed

+607
-8
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ $ 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)).
17+
18+
To run units:
19+
20+
```
21+
npm units
22+
```
23+
24+
To run all tests:
1725

1826
```
1927
npm test

api/VsoClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,4 @@ export class VsoClient {
323323

324324
return result;
325325
}
326-
}
326+
}

make.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,22 @@ 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+
target.units();
56+
}
57+
58+
target.samples = function() {
4559
target.build();
4660

4761
var modPath = path.join(__dirname, 'samples', 'node_modules');
@@ -51,10 +65,6 @@ target.test = function() {
5165
run('npm install ../_build');
5266
popd();
5367
run('tsc -p samples');
54-
}
55-
56-
target.samples = function() {
57-
target.test();
5868

5969
pushd('samples');
6070
run('node run.js');

0 commit comments

Comments
 (0)