mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Fix some tests
This commit is contained in:
@@ -24,7 +24,7 @@ class Assert {
|
||||
static passedTests: number = 0;
|
||||
|
||||
static Results() {
|
||||
console.log('Tests succeeded - ' + passedTests + '/' + totalTests + '; Tests failed - ' + (totalTests - passedTests) + '/' + totalTests);
|
||||
console.log('Tests succeeded - ' + this.passedTests + '/' + this.totalTests + '; Tests failed - ' + (this.totalTests - this.passedTests) + '/' + this.totalTests);
|
||||
}
|
||||
|
||||
static AssertionFailed(actual: any, expected: any, test: string) {
|
||||
@@ -32,21 +32,21 @@ class Assert {
|
||||
}
|
||||
|
||||
static Equal(actual: any, expected: any, test?: string) {
|
||||
totalTests++;
|
||||
this.totalTests++;
|
||||
if (actual === expected) {
|
||||
passedTests++;
|
||||
this.passedTests++;
|
||||
return;
|
||||
}
|
||||
AssertionFailed(actual, expected, test);
|
||||
this.AssertionFailed(actual, expected, test);
|
||||
}
|
||||
|
||||
static NotEqual(actual: any, expected: any, test?: string) {
|
||||
totalTests++;
|
||||
this.totalTests++;
|
||||
if (actual !== expected) {
|
||||
passedTests++;
|
||||
this.passedTests++;
|
||||
return;
|
||||
}
|
||||
AssertionFailed(actual, expected, test);
|
||||
this.AssertionFailed(actual, expected, test);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user