MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / assertNoMutations

Function assertNoMutations

test/assertions/assertNoMutations.js:7–15  ·  view source on GitHub ↗
(entities, procedure)

Source from the content-addressed store, hash-verified

5 * @returns {Promise<void>}
6 */
7export async function assertNoMutations(entities, procedure) {
8 const entitiesBefore = entities.map((entity) => JSON.stringify(entity));
9
10 await procedure();
11
12 entities.forEach((entity, i) => {
13 expect(entitiesBefore[i]).toEqual(JSON.stringify(entity));
14 });
15}
16
17export default { assertNoMutations };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected