T019
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import Ajv, { type ErrorObject } from 'ajv';
|
||||
import addFormats from 'ajv-formats';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
// Implementation placeholder import; will fail until implemented per tasks T016, T018
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error - module not implemented yet
|
||||
import { exportToJson } from '../../src/export';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@@ -20,7 +18,8 @@ const schemaPath = path.join(
|
||||
describe('Contract: export JSON schema (T009)', () => {
|
||||
it('exportToJson() output should validate against export.schema.json', async () => {
|
||||
const schemaJson = JSON.parse(fs.readFileSync(schemaPath, 'utf-8'));
|
||||
const ajv = new Ajv({ allErrors: true, strict: true });
|
||||
const ajv = new Ajv({ allErrors: true, strict: true });
|
||||
addFormats(ajv);
|
||||
const validate = ajv.compile(schemaJson);
|
||||
|
||||
// Minimal call; actual implementation will read from DB/models
|
||||
|
||||
Reference in New Issue
Block a user