(storeInit)
| 1554 | const initStoreQueue = [] |
| 1555 | |
| 1556 | function factoryBucket (storeInit) { |
| 1557 | builtBucket++ |
| 1558 | t.assert.deepStrictEqual(initStoreQueue.pop(), storeInit) |
| 1559 | const store = new Map(storeInit) |
| 1560 | return { |
| 1561 | add (schema) { |
| 1562 | added++ |
| 1563 | store.set(schema.$id, schema) |
| 1564 | }, |
| 1565 | getSchema (id) { |
| 1566 | return store.get(id) |
| 1567 | }, |
| 1568 | getSchemas () { |
| 1569 | // what is returned by this function, will be the `storeInit` parameter |
| 1570 | initStoreQueue.push(store) |
| 1571 | return store |
| 1572 | } |
| 1573 | } |
| 1574 | } |
| 1575 | |
| 1576 | const fastify = Fastify({ |
| 1577 | schemaController: { |
nothing calls this directly
no outgoing calls
no test coverage detected