Skip to content

Commit

Permalink
Preparing first release
Browse files Browse the repository at this point in the history
  • Loading branch information
acadet committed Oct 13, 2014
1 parent 7611cc0 commit ee5498d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
language: node_js
node_js:
- "0.11"
notifications:
email:
on_success: never
on_failure: always

before_install:
- "npm install -g grunt-cli"
install:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Oscar - A TypeScript test harness
# Oscar - A TypeScript test harness [![Build Status](https://travis-ci.org/acadet/oscar.svg?branch=master)](https://travis-ci.org/acadet/oscar)

> Beauty is a form of Genius--is higher, indeed, than Genius, as it needs no explanation.
### Main features:

Expand Down
2 changes: 1 addition & 1 deletion buildLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run(self, output, path, testOutput, maxRuntime, buildFailure):
print('\nDone!')

if __name__ == '__main__':
output = None
output = 'output.js'
path = '.'
testOutput = 0
maxRuntime = 30 * 1000
Expand Down
11 changes: 7 additions & 4 deletions src/Assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ class Assert {

/**
* Asserts provided value is null
* @param {any} value [description]
* @param {T} value [description]
*/
static isNull(value : any) : void {
static isNull<T>(value : T) : void {
if (value !== null && value !== undefined) {
throw new Error('Expected value to be null');
}
}

/**
* Asserts provided value is not null
* @param {any} value [description]
* @param {T} value [description]
*/
static isNotNull(value : any) : void {
static isNotNull<T>(value : T) : void {
if (value === null || value === undefined) {
throw new Error('Expected value to be not null');
}
Expand All @@ -70,6 +70,9 @@ class Assert {
}
}

/**
* Asserts provided values are not equal
*/
static areNotEqual<T>(unexpected : T, value : T) : void {
if (value === unexpected) {
throw new Error('Unexpected ' + unexpected + ' instead of ' + value);
Expand Down
2 changes: 1 addition & 1 deletion src/IOscarObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ interface IOscarObserver {
/**
* Notifies asynchronous test has failed
*/
fail() : void;
fail(error? : Error) : void;
}
4 changes: 2 additions & 2 deletions src/internal/OscarObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ module Oscar {
}
}

fail() : void {
fail(error? : Error) : void {
if (!this._isStopped) {
this._isStopped = true;
this._listener.onFail();
this._listener.onFail(error);
}
}

Expand Down

0 comments on commit ee5498d

Please sign in to comment.