Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
hermione-gemini-migrator
Advanced tools
Plugin for hermione for migration gemini tests.
npm i -D hermione-gemini-migrator
Set options for the plugin in your hermione config:
module.exports = {
// ...
plugins: {
'hermione-gemini-migrator': {
enabled: false,
filePathReplacer: filePath =>
filePath
.replace('gemini.js', 'hermione.js')
.replace('gemini/test-suites', 'features'),
browserIdReplacer: browserId => {
switch(browserId) {
case 'ie11':
return 'edge-desktop'
default:
return browserId;
}
}
commandReplacers: {
url: code => code.replace(/url\((.*?)\);/, (match, p1) => {
return `customUrl(${JSON.stringify(qs.parse(url.parse(p1.replace(/\"/g, '')).query))})`;
})
},
afterEach: (hermione) => {
const {
inputSuite,
outputTestCollection,
inputFilePath,
outputFilePath,
inputScreenPaths,
outputScreenPaths,
config,
utils
} = hermione.geminiMigrator;
// Pring filepathh
console.log(outputFilePath);
// Print input test names
utils.suiteWalker(inputSuite, suite => {
if (suite.url && !(suite.children && suite.children.length)) console.log(suite.fullName);
});
// Print output test names
const testDict = {};
outputTestCollection.eachTest(test => {
const fullName = test.fullTitle();
if (testDict[fullName]) return;
testDict[fullName] = true;
console.log(fullName);
});
}
}
},
// ...
}
Run hermione with cli option (if enabled: false
):
npx hermione --gemini-migrate
Option | Default | Description |
---|---|---|
enabled | false | Option for enable/disable the plugin. |
geminiConfig | '.gemini.js' | Path to Gemini config. |
inputPatterns | '**/*.gemini.js' | Patterns for searching gemini files. Read more: fast-glob |
filePathReplacer | filePath => filePath.replace(/gemini/g, 'hermione') | Function for replacing substring in test filePath . |
browserIdReplacer | browserId => browserId | Function for replacing substring in browserId . |
commandReplacers | {} | Object with functions for replacing default command to custom in hermione tests. |
codeFormatter | code => code | Function for formatting code before writting. For example: prettier |
before | hermione => {} | Async or sync function that is called before writting all test files. |
beforeEach | hermione => {} | Async or sync function that is called before writting each test file. |
afterEach | hermione => {} | Async or sync function that is called after writting each test file. |
after | hermione => {} | Async or sync function that is called after writting all test files. |
MIT
FAQs
Plugin for hermione for migration gemini tests.
The npm package hermione-gemini-migrator receives a total of 0 weekly downloads. As such, hermione-gemini-migrator popularity was classified as not popular.
We found that hermione-gemini-migrator 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.