MCPcopy Create free account
hub / github.com/angular/angular / loadItems

Function loadItems

adev/shared-docs/services/search-history.service.spec.ts:38–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 let storage: Storage;
37
38 async function loadItems() {
39 for (const item of ITEMS) {
40 // Since adding an item sets a timestamp which is later
41 // used for sorting the items array, we
42 // update the clock by awaiting a timeout.
43 await new Promise((resolve) => setTimeout(resolve, 5));
44 service.addItem(item);
45 }
46 }
47
48 beforeEach(() => {
49 TestBed.configureTestingModule({

Callers 1

Calls 2

setTimeoutFunction · 0.85
addItemMethod · 0.45

Tested by

no test coverage detected