Created
March 9, 2014 02:46
-
-
Save kriskowal/9442223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("", function () { | |
it("", function () { | |
var frame = window.open("blah.html?id=10"); | |
return inFrame(frame, function () { | |
expect(window.location).toEndWith("id=10"); | |
}); | |
}); | |
}); |
And where the callback on inFrame
is serialized via toString
to the test context.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where
inFrame
establishes the test runner DSL inside the frame with an proxy test reporter that forwards messages back to the parent context’s current test report, and whereinFrame
returns a promise that resolves when all expectation messages that were sent have been received.