summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/api/response/response-headers-guard.any.js
blob: 4a67d067a718506139dcc96808a255f6a7a69961 (plain)
1
2
3
4
5
6
7
8
// META: global=window,worker
// META: title=Response: error static method

promise_test (async () => {
  const response = await fetch("../resources/data.json");
  assert_throws_js(TypeError, () => { response.headers.append("name", "value"); });
  assert_not_equals(response.headers.get("name"), "value", "response headers should be immutable");
}, "Ensure response headers are immutable");