fume-fhir-converter
Version:
FHIR-Utilized Mapping Engine - Community
30 lines • 1.14 kB
JavaScript
;
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 v2normalizeKey_1 = require("./v2normalizeKey");
describe('v2normalizeKey', () => {
let v2keyMap;
beforeEach(() => {
(0, cache_1.initCache)();
v2keyMap = (0, cache_1.getCache)().v2keyMap;
});
(0, globals_1.test)('normalizes key', async () => {
const res = await (0, v2normalizeKey_1.v2normalizeKey)('hello');
expect(res).toBe('Hello');
});
(0, globals_1.test)('stores normalized key', async () => {
await (0, v2normalizeKey_1.v2normalizeKey)('hello');
expect(v2keyMap.get('hello')).toBe('Hello');
});
(0, globals_1.test)('returns from cache, if exists in cache.v2keyMap', async () => {
v2keyMap.set('hello', 'Hello2');
const res = await (0, v2normalizeKey_1.v2normalizeKey)('hello');
expect(res).toBe('Hello2');
});
});
//# sourceMappingURL=v2normalizeKey.test.js.map