MCPcopy Index your code
hub / github.com/ampproject/amphtml / expectStorage

Function expectStorage

test/unit/test-storage.js:52–63  ·  view source on GitHub ↗
(keyValues)

Source from the content-addressed store, hash-verified

50 });
51
52 function expectStorage(keyValues) {
53 const list = [];
54 for (const k in keyValues) {
55 list.push(
56 storage.get(k).then((value) => {
57 const expectedValue = keyValues[k];
58 expect(value).to.equal(expectedValue, `For "${k}"`);
59 })
60 );
61 }
62 return Promise.all(list);
63 }
64
65 it('should configure store correctly', () => {
66 const store1 = new Store({});

Callers 1

test-storage.jsFile · 0.85

Calls 4

expectFunction · 0.85
pushMethod · 0.45
thenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected