a71f801c3f
- Prisma schema: User, Session, RepoConfig, Preview, Job, WebhookToken, NoConfigComment, AdminSettings - Backend: auth (login/logout/me/first-user setup), webhook handler with HMAC verification, EC2 service, SSH service, deploy pipeline, job queue worker, cron workers - Frontend: Login with first-user detection, Dashboard, PreviewDetail with live log streaming, Settings, Repos config, Admin panel, SetupWizard, Privacy page - Docker Compose and Dockerfile for self-hosted deployment - Uses bcryptjs for Node 24 compatibility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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);
|
|
});
|
|
});
|
|
}); |