UNPKG

fume-fhir-converter

Version:

FHIR-Utilized Mapping Engine - Community

36 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * © Copyright Outburn Ltd. 2022-2024 All Rights Reserved * Project name: FUME-COMMUNITY */ const globals_1 = require("@jest/globals"); const cache_1 = require("./cache"); const simpleCache_1 = require("./simpleCache"); class TestCache extends simpleCache_1.SimpleCache { } describe('SimpleCache', () => { (0, globals_1.test)('getCache fails if not init', async () => { expect(() => { (0, cache_1.getCache)(); }).toThrow(); }); (0, globals_1.test)('initCache with default class', async () => { (0, cache_1.initCache)(); expect(() => { (0, cache_1.getCache)(); }).not.toThrow(); }); (0, globals_1.test)('initCache with override class', async () => { (0, cache_1.initCache)({ aliases: { cacheClass: TestCache, cacheClassOptions: {} } }); const { aliases, mappings } = (0, cache_1.getCache)(); expect(aliases).toBeInstanceOf(TestCache); expect(mappings).toBeInstanceOf(simpleCache_1.SimpleCache); }); }); //# sourceMappingURL=cache.test.js.map