Created
October 15, 2019 18:06
-
-
Save yoav-lavi/d93cd8377f7f7294bf7e2f98d55bdd8b to your computer and use it in GitHub Desktop.
Tests for store.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createStore = importModule('store'); | |
const { describe } = importModule('test'); | |
const store = createStore('store-test'); | |
await describe('Store', async test => { | |
const key = 'key'; | |
const value = 'value'; | |
await test('Saves and retrieves a value', async () => { | |
store.set(key, value); | |
const storedValue = store.get(key); | |
return storedValue === value; | |
}); | |
store.remove(key); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment