mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Add RecordObject.
This commit is contained in:
12
test/unit/util/RecordObject.test.ts
Normal file
12
test/unit/util/RecordObject.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user