
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
vitest-openapi
Advanced tools
[](https://www.npmjs.com/package/vitest-openapi) [](https://github.com/yutak23/vitest-openapi/actions/workflows/
Use Vitest to assert that HTTP responses satisfy an OpenAPI spec.
This library makes jest-openapi functionality available to Vitest.
$ref
in response definitions (i.e. $ref: '#/definitions/ComponentType/ComponentName'
)axios
, request-promise
, supertest
, superagent
, and chai-http
$ npm install vitest-openapi
$ yarn add vitest-openapi
import { describe, expect, it } from 'vitest';
import vitestOpenAPI from 'vitest-openapi';
import axios from 'axios';
// Load an OpenAPI file (YAML or JSON) into this plugin
vitestOpenAPI('path/to/openapi.yml');
// Write your test
describe('GET /example/endpoint', () => {
it('should satisfy OpenAPI spec', async () => {
// Get an HTTP response from your server (e.g. using axios)
const res = await axios.get('http://localhost:3000/example/endpoint');
expect(res.status).toEqual(200);
// Assert that the HTTP response satisfies the OpenAPI spec
expect(res).toSatisfyApiSpec();
});
});
※See also the Usage section of jest-openapi for more information.
If you use TypeScript, need vitest >= 0.31.0
(see the site Extending Matchers).
FAQs
[](https://www.npmjs.com/package/vitest-openapi) [](https://github.com/yutak23/vitest-openapi/actions/workflows/
The npm package vitest-openapi receives a total of 1,884 weekly downloads. As such, vitest-openapi popularity was classified as popular.
We found that vitest-openapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.