adjusted jasmine tests

This commit is contained in:
Diullei Gomes 2013-02-22 12:19:05 -03:00
parent fb67861390
commit 946862740a
2 changed files with 8 additions and 5 deletions

View File

@ -60,7 +60,7 @@ describe("Included matchers:", () => {
foo: 'foo'
};
expect(a.foo).toBeDefined();
expect(a.bar).not.toBeDefined();
expect((<any>a).bar).not.toBeDefined();
});
it("The `toBeUndefined` matcher compares against `undefined`", () => {
@ -68,7 +68,7 @@ describe("Included matchers:", () => {
foo: 'foo'
};
expect(a.foo).not.toBeUndefined();
expect(a.bar).toBeUndefined();
expect((<any>a).bar).toBeUndefined();
});
it("The 'toBeNull' matcher compares against null", () => {
@ -120,7 +120,7 @@ describe("Included matchers:", () => {
return 1 + 2;
};
var bar = () => {
return a + 1;
//return a + 1;
};
expect(foo).not.toThrow();
expect(bar).toThrow();
@ -439,7 +439,7 @@ describe("Asynchronous specs", () => {
currentWindowOnload(null);
}
document.querySelector('.version').innerHTML = jasmineEnv.versionString();
(<HTMLElement>document.querySelector('.version')).innerHTML = jasmineEnv.versionString();
execJasmine();
};

View File

@ -23,7 +23,6 @@ declare function runs(asyncMethod: Function): void;
declare function waitsFor(latchMethod: () => bool, failureMessage: string, timeout?: number): void;
declare function waits(timeout?: number): void;
declare module jasmine {
var Clock: Clock;
@ -165,6 +164,8 @@ declare module jasmine {
toBeLessThan(expected): bool;
toBeGreaterThan(expected): bool;
toBeCloseTo(expected, precision): bool;
toContainHtml(expected: string): bool;
toContainText(expected: string): bool;
toThrow(expected? ): bool;
not: Matchers;
@ -291,4 +292,6 @@ declare module jasmine {
Clock: Clock;
util: Util;
}
export var HtmlReporter: any;
}