
Security News
CISA Rebuffs Funding Concerns as CVE Foundation Draws Criticism
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
jest-expect-openapi
Advanced tools
A Vitest and Jest custom matcher for asserting valid OpenAPI definitions.
npm install jest-expect-openapi --save-dev
import toBeAValidOpenAPIDefinition from 'jest-expect-openapi';
import { expect, test } from 'vitest';
expect.extend({ toBeAValidOpenAPIDefinition });
test('should be a valid OpenAPI definition', () => {
expect(oas).toBeAValidOpenAPIDefinition();
});
test('should not be a valid OpenAPI definition', () => {
expect(invalidOas).not.toBeAValidOpenAPIDefinition();
});
The usage is nearly identical in Jest:
import toBeAValidOpenAPIDefinition from 'jest-expect-openapi';
expect.extend({ toBeAValidOpenAPIDefinition });
test('should be a valid OpenAPI definition', () => {
expect(oas).toBeAValidOpenAPIDefinition();
});
test('should not be a valid OpenAPI definition', () => {
expect(invalidOas).not.toBeAValidOpenAPIDefinition();
});
FAQs
Jest/Vitest matcher for asserting valid OpenAPI definitions
The npm package jest-expect-openapi receives a total of 292 weekly downloads. As such, jest-expect-openapi popularity was classified as not popular.
We found that jest-expect-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.