Skip to content

Instantly share code, notes, and snippets.

@kriskowal
Created March 9, 2014 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kriskowal/9442223 to your computer and use it in GitHub Desktop.
Save kriskowal/9442223 to your computer and use it in GitHub Desktop.
describe("", function () {
it("", function () {
var frame = window.open("blah.html?id=10");
return inFrame(frame, function () {
expect(window.location).toEndWith("id=10");
});
});
});
@kriskowal
Copy link
Author

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 where inFrame returns a promise that resolves when all expectation messages that were sent have been received.

@kriskowal
Copy link
Author

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