6de2455917
- Added GLOBAL_MARKETS_TITLE to all translation files - Updated footer with 12 markets (4 active + 8 upcoming) - Translated market section to: zh-cn, zh-tw, ja, ko, th, vi, id, ms, hi - Built and deployed to production - CloudFront invalidation: I3RTMXVFDJXWLG3SYX208OP1CC
26 lines
828 B
JavaScript
26 lines
828 B
JavaScript
const { assert } = require('chai');
|
|
const storage = require('../src/storage');
|
|
|
|
describe('storage', () => {
|
|
it('should store a task', () => {
|
|
global.scheduledTasks = new Map();
|
|
storage.save({});
|
|
assert.lengthOf(global.scheduledTasks, 1);
|
|
});
|
|
|
|
it('should get all tasks', () => {
|
|
global.scheduledTasks = new Map();
|
|
global.scheduledTasks.set(0, {});
|
|
assert.lengthOf(storage.getTasks(), 1);
|
|
});
|
|
|
|
describe('on import', () => {
|
|
it('should keep stored items across imports', () => {
|
|
delete require.cache[require.resolve('../src/storage')];
|
|
global.scheduledTasks = new Map();
|
|
storage.save({});
|
|
let storage2 = require('../src/storage');
|
|
assert.lengthOf(storage2.getTasks(), 1);
|
|
});
|
|
});
|
|
}); |