DEV: Change test localStorage prefix (#17906)
…to something more easily recognizable and less collision-prone
This commit is contained in:
parent
5d1cf006ab
commit
92035cdc62
|
@ -1,5 +1,7 @@
|
|||
import { isTesting } from "discourse-common/config/environment";
|
||||
|
||||
const TEST_KEY_PREFIX = "__test_";
|
||||
|
||||
// A simple key value store that uses LocalStorage
|
||||
let safeLocalStorage;
|
||||
|
||||
|
@ -20,7 +22,7 @@ export default class KeyValueStore {
|
|||
context = null;
|
||||
|
||||
constructor(ctx) {
|
||||
this.context = isTesting() ? `test_${ctx}` : ctx;
|
||||
this.context = isTesting() ? `${TEST_KEY_PREFIX}${ctx}` : ctx;
|
||||
}
|
||||
|
||||
abandonLocal() {
|
||||
|
|
Loading…
Reference in New Issue