mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
24 lines
669 B
TypeScript
24 lines
669 B
TypeScript
import { readFileSync } from 'fs';
|
|
import { join as pathJoin, resolve as pathResolve } from 'path';
|
|
|
|
import { validateDocument } from '../../src/validate';
|
|
import { parseYamlToDocument, makeConfigForRuleset } from '../../src/__tests__/utils';
|
|
|
|
export const name = 'Validate with no rules';
|
|
export const count = 10;
|
|
|
|
const rebillyDefinitionRef = pathResolve(pathJoin(__dirname, 'rebilly.yaml'));
|
|
const rebillyDocument = parseYamlToDocument(
|
|
readFileSync(rebillyDefinitionRef, 'utf-8'),
|
|
rebillyDefinitionRef,
|
|
);
|
|
|
|
const config = makeConfigForRuleset({});
|
|
|
|
export function measureAsync() {
|
|
return validateDocument({
|
|
document: rebillyDocument,
|
|
config,
|
|
});
|
|
}
|