mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-26 19:00:39 +01:00
Replace gone style store test with sample
This commit is contained in:
parent
a5307054b3
commit
ae9afdd8d9
2 changed files with 7 additions and 16 deletions
7
test/sample_test.js
Normal file
7
test/sample_test.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import assert from 'assert'
|
||||
|
||||
describe('Component', () => {
|
||||
it('#always successds', () => {
|
||||
assert.equal(1, 1)
|
||||
})
|
||||
})
|
|
@ -1,16 +0,0 @@
|
|||
import { SettingsStore } from '../src/libs/stylestore.js'
|
||||
import assert from 'assert'
|
||||
|
||||
describe('SettingsStore', () => {
|
||||
const store = new SettingsStore()
|
||||
|
||||
it('#get should return access token from local storage', () => {
|
||||
window.localStorage.setItem('maputnik:access_token', 'OLD_TOKEN')
|
||||
assert.equal(store.accessToken, 'OLD_TOKEN')
|
||||
})
|
||||
|
||||
it('#set should set access token in local storage', () => {
|
||||
store.accessToken = 'NEW_TOKEN'
|
||||
assert.equal(window.localStorage.getItem('maputnik:access_token'), 'NEW_TOKEN')
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue