Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@mmisty/cypress-tags
Advanced tools
Parses tags from test/suite title or/and from cypress configuration object into test .tags object
This plugin helps to parse tags to add them into Mocha Test object, so you can access tags within hooks and within a test.
Example:
it('test with tags @test', { tags: ['@abc'] }, function () {
// this.test?.tags object has all tags
expect(this.test?.tags).to.deep.eq([
{ tag: '@abc', info: [] },
{ tag: '@test', info: [] },
]);
});
install with npm:
npm i -D @mmisty/cypress-tags
or with yarn:
yarn add @mmisty/cypress-tags -D
configure project:
Put into your support.ts (or e2e.ts) file
import '@mmisty/cypress-tags'
That's it! Types should be added automatically if you use typescript.
There are several ways to add tags:
@simple
, @tag("info")
)it('test with tags @simple @tag("withInfo")', function () {
// ...
});
it('test with tags', { tags: ['@abc'] }, function () {
// ...
});
it('test with tags', { tags: '@abc' }, function () {
// ...
});
it('test with tags', { tags: [{ tag: '@abc', info: ['my info'] }] }, function () {
// ...
});
When tags are added to a test you can use them within hooks. This may be helpful when you want to do some action depending on tags:
Example (will skip tests with @skip
tag):
// my.test.ts
it('test to skip @skip', function () {
// ...
});
// e2e.ts / setup.ts
beforeEach(function() {
const test = this.currentTest;
if(test){
if(test.tags?.map(t => t.tag).includes('@skip')){
this.skip();
}
}
})
To see tags in test / suite title set env variable cyTagsShowTagsInTitle
to true
If you want to keep titles as they are set variable to undefined
true
show only own tagsFAQs
Parses tags from test/suite title or/and from cypress configuration object into test .tags object
We found that @mmisty/cypress-tags 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.