|
|
@ -118,4 +118,15 @@ test('SystemRepo gets multiple system values', () => { |
|
|
|
mockRealm.create(SystemEntity.name, systemKey2); |
|
|
|
let response = testRepo.getSystemKeyValue(systemKey1.key); |
|
|
|
expect(response).toEqual('Multiple system keys found for key1'); |
|
|
|
}) |
|
|
|
|
|
|
|
test('Max out score repo cache', () => { |
|
|
|
let mockRealm = new MockRealm({schemaVersion: 0}); |
|
|
|
let testRepo = new ScoreRepo(mockRealm); |
|
|
|
|
|
|
|
for (let i = 0; i < 200; ++i) { |
|
|
|
testRepo.updateScoreCache({value: i}) |
|
|
|
} |
|
|
|
|
|
|
|
expect(testRepo.scoreCache.length).toEqual(100); |
|
|
|
}) |