
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
executable-stories-jest
Advanced tools
BDD-style executable stories for Jest with documentation generation
BDD-style executable stories for Jest with documentation generation. Uses Jest's native describe / it; step markers and optional callbacks register scenario metadata for the reporter.
pnpm add -D executable-stories-jest executable-stories-formatters
Call story.init() at the start of any test that should appear in generated docs.
import { expect, it } from '@jest/globals';
import { story } from 'executable-stories-jest';
it('adds two numbers', () => {
story.init();
story.given('two numbers 5 and 3');
const a = 5;
const b = 3;
story.when('I add them together');
const result = a + b;
story.then('the result is 8');
expect(result).toBe(8);
});
Top-level step helpers are also exported for compatibility:
import { given, story, then, when } from 'executable-stories-jest';
it('logs in', () => {
story.init();
given('a registered user');
when('valid credentials are submitted');
then('the dashboard is shown');
});
Add the reporter to Jest config.
export default {
reporters: [
'default',
[
'executable-stories-jest/reporter',
{
formats: ['markdown', 'html'],
outputDir: 'docs',
outputName: 'user-stories',
},
],
],
};
Options match FormatterOptions from executable-stories-formatters. Optional rawRunPath writes raw run JSON for use with the executable-stories CLI.
Pass options to story.init(options):
story.init({
tags: ['smoke', 'auth'],
ticket: 'AUTH-123',
meta: { owner: 'platform' },
});
Supported options: tags, ticket, meta, traceUrlTemplate.
story.init() plus story.given, story.when, story.then, story.and, story.but. Top-level step helpers are also exported.story.init() inside the Jest test() or it() callback. Scenario title comes from the Jest test title.story.note(), story.json(), story.code(), story.table(), story.mermaid(), and related doc methods.story, top-level step helpers, and types. Reporter lives at executable-stories-jest/reporter.FAQs
BDD-style executable stories for Jest with documentation generation
We found that executable-stories-jest 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
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.