diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts index 32339676a6..46507d68de 100644 --- a/jasmine/jasmine-tests.ts +++ b/jasmine/jasmine-tests.ts @@ -60,7 +60,7 @@ describe("Included matchers:", () => { foo: 'foo' }; expect(a.foo).toBeDefined(); - expect(a.bar).not.toBeDefined(); + expect((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((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(); + (document.querySelector('.version')).innerHTML = jasmineEnv.versionString(); execJasmine(); }; diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 0d16559e92..56f41b48f1 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -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; } \ No newline at end of file