MCPcopy
hub / github.com/GoogleChrome/workbox / compareResponses

Function compareResponses

infra/testing/helpers/compareResponses.mjs:9–18  ·  view source on GitHub ↗
(first, second, shouldBeSame)

Source from the content-addressed store, hash-verified

7*/
8
9const compareResponses = async (first, second, shouldBeSame) => {
10 const firstBody = await first.clone().text();
11 const secondBody = await second.clone().text();
12
13 if (shouldBeSame) {
14 expect(firstBody).to.equal(secondBody);
15 } else {
16 expect(firstBody).to.not.equal(secondBody);
17 }
18};
19
20export {compareResponses};

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected