zenstack/packages/cli/test/db.test.ts
Yiming Cao 4f7df7ed12
fix: schema generation for unsupported field type (#64)
* fix: schema generation for unsupported field type

* fix build

* update

* more tests

* update
2025-07-01 15:48:02 +02:00

18 lines
497 B
TypeScript

import fs from 'node:fs';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
import { createProject, runCli } from './utils';
const model = `
model User {
id String @id @default(cuid())
}
`;
describe('CLI db commands test', () => {
it('should generate a database with db push', () => {
const workDir = createProject(model);
runCli('db push', workDir);
expect(fs.existsSync(path.join(workDir, 'zenstack/dev.db'))).toBe(true);
});
});