mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-23 01:24:30 +02:00
20 lines
493 B
Plaintext
20 lines
493 B
Plaintext
|
LET url = @static + "/api/ts"
|
||
|
LET page = DOCUMENT(url, {
|
||
|
driver: "http",
|
||
|
headers: {
|
||
|
"Access-Control-Allow-Origin": "*",
|
||
|
"X-Request-Id": "foobar"
|
||
|
}
|
||
|
})
|
||
|
|
||
|
LET el = ELEMENT(page, "#headers")
|
||
|
LET actual = JSON_PARSE(el.innerText)
|
||
|
LET expected = {
|
||
|
"Access-Control-Allow-Origin": ["*"],
|
||
|
"X-Request-Id": ["foobar"]
|
||
|
}
|
||
|
|
||
|
RETURN EXPECT(expected, {
|
||
|
"Access-Control-Allow-Origin": actual["Access-Control-Allow-Origin"],
|
||
|
"X-Request-Id": actual["X-Request-Id"]
|
||
|
})
|