Permalink
Browse files

adjusted jasmine tests

  • Loading branch information...
1 parent fb67861 commit 946862740ad8f36855d10aea9db9cb87f19a4dba @Diullei Diullei committed Feb 22, 2013
Showing with 8 additions and 5 deletions.
  1. +4 −4 jasmine/jasmine-tests.ts
  2. +4 −1 jasmine/jasmine.d.ts
@@ -60,15 +60,15 @@ 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`", () => {
var a = {
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();
};
@@ -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;
}

0 comments on commit 9468627

Please sign in to comment.