From c0da12af6ea55e4fb7080c6c32c7e533f59420a9 Mon Sep 17 00:00:00 2001 From: William Chargin Date: Tue, 24 Jul 2018 19:19:53 -0700 Subject: [PATCH] Use `MemoryLocalStore` for existing tests (#525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: This resolves a TODO. It’s not urgent, but it’s good practice. wchargin-branch: use-memory-local-store --- src/app/credExplorer/App.test.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/app/credExplorer/App.test.js b/src/app/credExplorer/App.test.js index f631a2c..9be1812 100644 --- a/src/app/credExplorer/App.test.js +++ b/src/app/credExplorer/App.test.js @@ -2,7 +2,7 @@ import React from "react"; import {shallow} from "enzyme"; -import BrowserLocalStore from "../browserLocalStore"; +import MemoryLocalStore from "../memoryLocalStore"; import {pagerank} from "../../core/attribution/pagerank"; import {App} from "./App"; @@ -97,14 +97,7 @@ function example() { describe("app/credExplorer/App", () => { function makeLocalStore() { - // TODO(@wchargin): This should be an in-memory implementation of - // LocalStore, not the browser version. This only works because the - // store is not actually needed for the shallow render to complete - // successfully. - return new BrowserLocalStore({ - version: "1", - keyPrefix: "cred-explorer", - }); + return new MemoryLocalStore(); } it("renders with clean state", () => { shallow();