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.
automutate-tests
Advanced tools
End-to-end test utilities for packages that rely on automutate
.
automutate-tests
exports a describeMutationTestCases
function that takes in three arguments:
Its describe
method takes in a a directory path containing test case directories.
Note that TestsFactory
expects global describe
and it
functions to be declared.
If you're using a runner like Mocha or Jasmine this will work.
It also expects chai
to be explicitly installed.
npm install --save-dev chai mocha
Define a test file with JavaScript or TypeScript similar to the following:
import { describeMutationTestCases } from "automutate-tests";
import * as path from "path";
import { MyMutationsProvider } from "./MyMutationsProvider";
describeMutationTestCases(
path.join(__dirname, "cases"),
(fileName, settingsFileName) => new MyMutationsProvider(fileName, settingsFileName),
{
actual: "actual.txt",
expected: "expected.txt",
original: "original.txt",
settings: "settings.txt"
});
};
Then, create a directory named cases
with at least one sub-directory ("case").
Each case should contain files named expected.txt
and original.txt
with your extension.
When tests are run, the original.txt
file will be copied to an actual.txt
file and mutated.
It should then contain the same contents as the expected.txt
file.
FAQs
Test harness for automutate consumers.
The npm package automutate-tests receives a total of 4 weekly downloads. As such, automutate-tests popularity was classified as not popular.
We found that automutate-tests 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.
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.