File size: 508 Bytes
3206347 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import { faker } from '@faker-js/faker';
import Config from '../../src/models/config';
export const createConfig = async (params = {}) => {
const configData = {
key: params?.key || faker.lorem.word(),
value: params?.value || { data: 'sampleConfig' },
};
const config = await Config.query().insertAndFetch(configData);
return config;
};
export const createInstallationCompletedConfig = async () => {
return await createConfig({ key: 'installation.completed', value: { data: true } });
}
|