fixed type error in test
This commit is contained in:
@ -123,7 +123,7 @@ describe('Cache', () => {
|
|||||||
// Edge: add error handling test
|
// Edge: add error handling test
|
||||||
it('throws if instantiating with invalid key property', () => {
|
it('throws if instantiating with invalid key property', () => {
|
||||||
expect(() => {
|
expect(() => {
|
||||||
const invalid = new Cache<'foo', TestItem>('foo');
|
const invalid = new Cache<'string', TestItem>('id');
|
||||||
// try invalid.add({id: 'z', value: 'fail'}) if needed
|
// try invalid.add({id: 'z', value: 'fail'}) if needed
|
||||||
}).not.toThrow();
|
}).not.toThrow();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user