mirror of
https://github.com/timvisee/send.git
synced 2025-10-05 02:19:26 +02:00
refactored storage, style tweaks
This commit is contained in:
parent
8fb770a4ea
commit
55df061567
8 changed files with 42 additions and 30 deletions
|
@ -70,17 +70,17 @@ describe('Storage', function() {
|
|||
|
||||
it('adds right prefix based on expire time', async function() {
|
||||
await storage.set('x', null, { foo: 'bar' }, 300);
|
||||
const path_x = await storage.getPrefixedId('x');
|
||||
const { filePath: path_x } = await storage.getPrefixedInfo('x');
|
||||
assert.equal(path_x, '1-x');
|
||||
await storage.del('x');
|
||||
|
||||
await storage.set('y', null, { foo: 'bar' }, 86400);
|
||||
const path_y = await storage.getPrefixedId('y');
|
||||
const { filePath: path_y } = await storage.getPrefixedInfo('y');
|
||||
assert.equal(path_y, '1-y');
|
||||
await storage.del('y');
|
||||
|
||||
await storage.set('z', null, { foo: 'bar' }, 86400 * 7);
|
||||
const path_z = await storage.getPrefixedId('z');
|
||||
const { filePath: path_z } = await storage.getPrefixedInfo('z');
|
||||
assert.equal(path_z, '7-z');
|
||||
await storage.del('z');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue