feat: Add RecordObject.

This commit is contained in:
Ruben Verborgh
2020-12-21 00:06:32 +01:00
parent eb6ba0374f
commit 147f3cf0c7
3 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { RecordObject } from '../../../src/util/RecordObject';
describe('RecordObject', (): void => {
it('returns an empty record when created without parameters.', async(): Promise<void> => {
expect(new RecordObject()).toStrictEqual({});
});
it('returns the passed record.', async(): Promise<void> => {
const record = { abc: 'def' };
expect(new RecordObject(record)).toBe(record);
});
});