mirror of
https://github.com/directus/directus.git
synced 2026-02-01 23:45:02 -05:00
20 lines
530 B
TypeScript
20 lines
530 B
TypeScript
import { MemoryStore } from '../src/utils/';
|
|
import { expect } from 'chai';
|
|
|
|
describe('Utils', () => {
|
|
describe('MemoryStore', () => {
|
|
it('Gets values based on key', async () => {
|
|
const store = new MemoryStore();
|
|
store['values'].test = 'test';
|
|
const result = await store.getItem('test');
|
|
expect(result).to.equal('test');
|
|
});
|
|
|
|
it('Sets value based on key', async () => {
|
|
const store = new MemoryStore();
|
|
await store.setItem('test', 'test');
|
|
expect(store['values'].test).to.equal('test');
|
|
});
|
|
});
|
|
});
|