
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Cross-runtime testing helpers that map to the native test runners in Bun, Deno, and Node.js so your specs can stay portable.
Every runtime ships its own standard library test runner with slightly different semantics. cross-bdd gives you a single describe/it pair that forwards to the familiar primitives in each environment, letting you share the same test suite without wrapping everything yourself.
npm add -D cross-bdd
# or
pnpm add -D cross-bdd
# or
yarn add -D cross-bdd
# or
bun add -d cross-bdd
# or
deno add npm:cross-bdd
// foo.test.ts
import { describe, it } from 'cross-bdd'
describe('math', () => {
it('adds numbers', () => {
const result = 2 + 2
if (result !== 4) {
throw new Error('Expected 4')
}
})
it('supports async work', async () => {
await new Promise((resolve) => setTimeout(resolve, 10))
})
})
Then run your tests with the native test runner for your runtime:
# Bun
bun test
# Deno
deno test
# Node.js
node --test
Can be used with @std/assert or @std/expect for runtime-agnostic assertions.
You can nest describe blocks as needed. Async describe bodies are supported.
An opinionated reusable workflow is provided in the repo. To use it, create a workflow file in your own repo:
# .github/workflows/test.yaml
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
uses: brc-dd/cross-bdd/.github/workflows/test.reusable.yaml@main
with:
deno_versions: stable # remove this line to skip Deno testing
bun_versions: latest # remove this line to skip Bun testing
node_versions: 20 22 24 # remove this line to skip Node.js testing
Takes inspiration from cross-org/test, cross-org/workflows, and @std/testing/bdd.
FAQs
Cross-runtime `describe`/`it` for Bun, Deno, and Node.js test runners.
We found that cross-bdd 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.