zenstack/packages/cli/test/init.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

13 lines
455 B
TypeScript

import fs from 'node:fs';
import path from 'node:path';
import tmp from 'tmp';
import { describe, expect, it } from 'vitest';
import { runCli } from './utils';
describe('Cli init command tests', () => {
it('should create a new project', () => {
const { name: workDir } = tmp.dirSync({ unsafeCleanup: true });
runCli('init', workDir);
expect(fs.existsSync(path.join(workDir, 'zenstack/schema.zmodel'))).toBe(true);
});
});