
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
fixtures-ts
Advanced tools
Type-safe test fixtures for Jest, Vitest, Bun, and Mocha. Automatic dependency resolution and cleanup with Playwright-style API
Type-safe test fixture management with automatic dependency resolution for any test framework.
npm install fixtures-ts
import {
createFixtures,
defineFixture,
type FixtureRegistry,
} from "fixtures-ts";
type Fixtures = {
db: Database;
client: TestClient;
};
const registry: FixtureRegistry<Fixtures> = {
db: defineFixture<Fixtures, [], Fixtures["db"]>([], async () => ({
value: await createTestDatabase(),
cleanup: async () => await closeDatabase(),
})),
client: defineFixture<Fixtures, ["db"], Fixtures["client"]>(
["db"],
async ({ db }) => ({
value: createTestClient(db),
cleanup: async () => {},
}),
),
};
const fixtures = createFixtures(registry, ["client"]);
beforeEach(fixtures.setup);
afterEach(fixtures.teardown);
test("should work", async () => {
const { client } = fixtures.get();
// use client...
});
Note: The
defineFixture()API is intentionally verbose to provide maximum type safety. I'm aware of this and exploring ways to simplify the fixture definition syntax while maintaining type safety. For now, the current approach works reliably and provides excellent TypeScript inference.
MIT
FAQs
Type-safe test fixtures for Jest, Vitest, Bun, and Mocha. Automatic dependency resolution and cleanup with Playwright-style API
We found that fixtures-ts demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.