* refactor: use fastify vite for the server by doing this we do not need to have local hacks for the routes. No local proxy needed. Everything just works. * fix: update the dockerfile build path * fix: update package.json * fix: fonts path
20 lines
646 B
JavaScript
20 lines
646 B
JavaScript
import assert from 'assert';
|
|
|
|
import isValidTTL from '../../../server/helpers/validate-ttl.js';
|
|
|
|
describe('Validate TTL', () => {
|
|
describe('#isValidTTL(ttl)', () => {
|
|
it('should validate x seconds to be true', async () => {
|
|
assert.equal(isValidTTL(300), true);
|
|
assert.equal(isValidTTL(14400), true);
|
|
assert.equal(isValidTTL(604800), true);
|
|
});
|
|
|
|
it('should validate x seconds to be false', async () => {
|
|
assert.equal(isValidTTL(301), false);
|
|
assert.equal(isValidTTL(14401), false);
|
|
assert.equal(isValidTTL(604801), false);
|
|
});
|
|
});
|
|
});
|