MCPcopy
hub / github.com/ampproject/amphtml / beforeEach

Function beforeEach

test/unit/test-form-data-wrapper.js:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 description: 'when native `entries` is not available',
17
18 beforeEach() {
19 nativeEntries = FormData.prototype.entries;
20 nativeDelete = FormData.prototype.delete;
21 // Remove native entries from the prototype in case the browser running
22 // the tests already have it to force the "no native `entries`"
23 // scenario.
24 FormData.prototype.entries = undefined;
25 FormData.prototype.delete = undefined;
26 },
27
28 afterEach() {
29 FormData.prototype.entries = nativeEntries;

Calls

no outgoing calls

Tested by

no test coverage detected