Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
allure-jasmine
Advanced tools
Allure integration Jasmine framework
Use your favorite node package manager to install required packages:
npm add -D allure-jasmine
Create spec/helpers/setup.ts
file with following content:
const AllureJasmineReporter = require("allure-jasmine");
const reporter = new AllureJasmineReporter();
jasmine.getEnv().addReporter(reporter);
Check that the helper matches with helper
field in your spec/support/jasmine.json
file.
The plugin provides custom commands which allow to add additional info inside your tests:
import { epic, attachment, parameter } from "allure-js-commons";
it("my test", async () => {
await attachment("Attachment name", "Hello world!", "text/plain");
await epic("my_epic");
await parameter("parameter_name", "parameter_value", {
mode: "hidden",
excluded: false,
});
});
import { link, issue, tms } from "allure-js-commons";
it("basic test", async () => {
await link("https://allurereport.org", "link type", "Allure Report");
await issue("https://github.com/allure-framework/allure-js/issues/352", "Issue Name", );
await tms("https://github.com/allure-framework/allure-js/tasks/352", "Task Name");
});
You can also configure links formatters to make usage much more convenient. %s
in urlTemplate
parameter will be replaced by given value.
```ts
const AllureJasmineReporter = require("allure-jasmine");
const reporter = new AllureJasmineReporter({
+ links: [
+ {
+ type: "issue",
+ urlTemplate: "https://example.org/issues/%s",
+ nameTemplate: "Issue: %s",
+ },
+ {
+ type: "tms",
+ urlTemplate: "https://example.org/tasks/%s"
+ },
+ {
+ type: "custom",
+ urlTemplate: "https://example.org/custom/%s"
+ },
+ ],
});
jasmine.getEnv().addReporter(reporter);
Then you can assign link using shorter notation:
import { link, issue, tms } from "allure-js-commons";
it("basic test", async () => {
await issue("351");
await issue("352", "Issue Name");
await tms("351");
await tms("352", "Task Name");
await link("custom", "352");
await link("custom", "352", "Link name");
});
The integration supports Allure steps, use them in following way:
import { step } from "allure-js-commons";
it("my test", async () => {
await step("foo", async () => {
await step("bar", async () => {
await step("baz", async () => {});
});
});
});
FAQs
Allure Jasmine integration
The npm package allure-jasmine receives a total of 2,118 weekly downloads. As such, allure-jasmine popularity was classified as popular.
We found that allure-jasmine demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.