
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@autometa/cucumber-runner
Advanced tools
Autometa Cucumber Runner is a wrapper for multiple established
test runners like jest and vitest that enables support for testing .feature files.
npm add -D @autometa/cucumber-runner
yarn add -D @autometa/cucumber-runner
pnpm add -D @autometa/cucumber-runner
To begin, add *.feature.ts as a test file pattern to your
test library config if needed. Also, add autometa.config.ts
to the setup files option
import { defineConfig } from 'vitest/config'
defineConfig({
...
setupFiles: ['autometa.config.ts']
include: ['**/*.{test,spec,feature}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}']
...
})
export default {
...
setupFilesAfterEnv: ['autometa.config.ts']
testMatch: ['**/?(*.)+(spec|test|feature).[jt]s?(x)']
...
}
Next, create the autometa.config.ts. To use globally available
step files, add a globals option, and provide the test functions
of your test framework. It's also a good idea to import reflect-metadata
from this file. reflect-metadata is a required dependency of this library.
import "reflect-metadata";
import { defineConfig } from "@autometa/cucumber-runner";
import { describe, test, beforeEach, beforeAll, afterEach, afterAll } from "vitest";
defineConfig({
globals: "globals",
runner: {
name: "vitest",
describe,
test,
beforeEach,
beforeAll,
afterEach,
afterAll,
},
});
import "reflect-metadata";
import { defineConfig } from "@autometa/cucumber-runner";
defineConfig({
globals: "globals",
runner: {
name: "jest",
describe,
test,
beforeEach,
beforeAll,
afterEach,
afterAll,
},
});
Feature: A User Can Log In
Background: Set up a new User
Given a new registered User
| username | name | age | password |
| johnny5 | John | 45 | paS5091! |
Scenario: A User logs in with valid credentials
When they log in
| username | password |
| johnny5 | paS5091! |
Then they see their profile
Scenario: A User logs in with a bad password
When they log in
| username | password |
| johnny5 | oops |
Then they are informed their password is incorrect
import { Given, When, Then, Feature, Before, Scenario } from "@autometa/cucumber-runner";
import { App } from "../src/app";
Before("Launch browser", async ({ world, myDriver }) => {
world.page = await myDriver.start(process.env.API_URL);
});
Given("a new registered User", async (data: HTable, { world, httpClient }: App) => {
const userDetails = data.json(0);
await httpClient.createUser(userDetails);
});
When("they log in", async (userDetails: HTable, { world: { page } }: App) => {
const { username, password } = userDetails.json(0);
await page.logUserIn(username, password);
});
Then("they see their profile", async ({ world: { page } }: App) => {
await page.verifyProfileOpen();
});
Then(
"they are informed their {word} is incorrect",
async (field: string, { world: { page } }: App) => {
await page.verifyBadLoginField(field);
}
);
Feature("../features/my-feature.feature");
// override Steps
Feature(() => {
Given("a new registered User", async (data: HTable, { world: { page } }: App) => {
const userDetails = data.json(0);
await page.gotoRegistration();
await page.registerWith(userDetails);
});
Scenario("A User logs in with a bad password", () => {
Then("they are informed their password is incorrect", async ({ world: { page } }: App) => {
await page.verifyBadPassword();
});
});
}, "../features/my-feature.feature");
// load multiple feature files
Feature("../features/my-feature.feature", "../features/my-other-feature.feature");
FAQs
Run cucumber with jest or vitest, with superpowers
The npm package @autometa/cucumber-runner receives a total of 10 weekly downloads. As such, @autometa/cucumber-runner popularity was classified as not popular.
We found that @autometa/cucumber-runner 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.