Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.