@effectionx/test-adapter@0.1.1Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
An abstract helper for integrating Effection with testing frameworks.
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
70%
Published
3 months ago (0.1.1)
Test Adapter
An abstract helper for integrating Effection with testing frameworks.
Typically, you won't use this module directly, but instead you'll use one of the
actual testing framework integrations. The following shows how you might
integrate it with the @std/bdd
module. You would never use it this way, this
demonstrates the general pattern of lifecycle.
import { run, sleep } from "effection"; import { createTestAdapter, TestAdapter } from "@effectionx/test-adapter"; import { describe, it, beforeEach } from "@std/bdd"; describe("something", () => { let adapter: TestAdapter; beforeAll(() => {) adapter = createTestAdapter("something"); }); afterAll(() => adapter.destroy()) adapter.addSetup(function*() { /* do some setup. equivalent of beforeEach() */ /* contexts set here will be visible in the test */* }); it("does a thing", async () => { await adapter.runTest(function*() { /* ... the body of the test */ }); }); });
Built and signed on
GitHub Actions
Add Package
deno add jsr:@effectionx/test-adapter
Import symbol
import * as test_adapter from "@effectionx/test-adapter";
Import directly with a jsr specifier
import * as test_adapter from "jsr:@effectionx/test-adapter";
Add Package
pnpm i jsr:@effectionx/test-adapter
pnpm dlx jsr add @effectionx/test-adapter
Import symbol
import * as test_adapter from "@effectionx/test-adapter";
Add Package
yarn add jsr:@effectionx/test-adapter
yarn dlx jsr add @effectionx/test-adapter
Import symbol
import * as test_adapter from "@effectionx/test-adapter";
Add Package
vlt install jsr:@effectionx/test-adapter
Import symbol
import * as test_adapter from "@effectionx/test-adapter";
Add Package
npx jsr add @effectionx/test-adapter
Import symbol
import * as test_adapter from "@effectionx/test-adapter";
Add Package
bunx jsr add @effectionx/test-adapter
Import symbol
import * as test_adapter from "@effectionx/test-adapter";