-
-
Save davetron5000/3d8dbc405b5a0a18f68668301e555e23 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("<locale-detection>", () => { | |
withHTML(` | |
<locale-detection url="http://example.net/locale"> | |
</locale-detection> | |
`).onFetch( "/locale", [ | |
{ then: { status: 200 }}, | |
] | |
).test("Receives the locale and timeZone from the browser", | |
({document,assert,fetchRequests}) => { | |
assert.equal(1,fetchRequests.length) | |
return readBodyIntoJSON(fetchRequests[0]).then( (json) => { | |
assert.equal(json["locale"],"en-US") | |
assert.equal(json["timeZone"],"UTC") | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment