diff --git a/squarenotsquare/__tests__/Repo-test.js b/squarenotsquare/__tests__/Repo-test.js index 5cc5c5c..32e8eb6 100644 --- a/squarenotsquare/__tests__/Repo-test.js +++ b/squarenotsquare/__tests__/Repo-test.js @@ -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); }) \ No newline at end of file