begin integration of improved indexeddb code
refactored SlopDB class to contain a CheckCache object, as there was a circular dependency previously
This commit is contained in:
@@ -62,7 +62,7 @@ describe("SlopDB", () => {
|
||||
})
|
||||
|
||||
it("caches a checked url", async () => {
|
||||
const cache = slopdb.get_check_cache()
|
||||
const cache = slopdb.check_cache
|
||||
expect(cache).toBeInstanceOf(CheckCache)
|
||||
|
||||
const slop_url = new URL("https://sloppy-slop.com/sloparticle")
|
||||
@@ -81,7 +81,7 @@ describe("SlopDB", () => {
|
||||
it("updates a cached url's timestamp when it is accessed", async () => {
|
||||
|
||||
|
||||
const cache = slopdb.get_check_cache()
|
||||
const cache = slopdb.check_cache
|
||||
|
||||
const slop_url = new URL("https://sloppy-slop.com/sloparticle")
|
||||
await cache.store(slop_url.toString())
|
||||
@@ -94,7 +94,7 @@ describe("SlopDB", () => {
|
||||
})
|
||||
|
||||
it("evicts the least recently accessed URL when an item is added to a full cache", async () => {
|
||||
const cache = slopdb.get_check_cache()
|
||||
const cache = slopdb.check_cache
|
||||
cache.cache_capacity = 2
|
||||
|
||||
const slop_url = new URL("https://sloppy-slop.com/sloparticle")
|
||||
|
||||
Reference in New Issue
Block a user