Registry / testing / hermione-gemini-migrator

hermione-gemini-migrator

JSON →
library0.1.1jsnpmunverified

A plugin for the hermione testing framework that automates migration of tests written for the deprecated gemini visual regression tool to hermione's format. Version 0.1.1 provides file path, browser ID, and command replacers to transform gemini test suites into hermione-compatible test collections. It supports callback hooks (before/beforeEach/afterEach/after) for custom transformations and logging, and can be enabled via CLI flag. Designed for teams upgrading from gemini to hermione, offering a configurable migration pipeline with minimal manual intervention.

npm install hermione-gemini-migrator
INSTALL
IMPORT
SIG · HERMIONE-GEMINI-MI
H
hermione-gemini-migrator
testingjavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
plugins: { 'hermione-gemini-migrator': { enabled: true } }
require('hermione-gemini-migrator')
Plugin is registered in hermione config under 'plugins' key, not imported directly.

Configures hermione-gemini-migrator plugin with file path, browser ID, and command replacers, plus an afterEach hook for logging migrated file paths.

// hermione config file module.exports = { plugins: { 'hermione-gemini-migrator': { enabled: true, filePathReplacer: filePath => filePath.replace('.gemini.js', '.hermione.js'), browserIdReplacer: browserId => browserId === 'ie11' ? 'edge-desktop' : browserId, commandReplacers: { url: code => code.replace(/url\((.*?)\);/, (match, p1) => { const qs = require('querystring'); const url = require('url'); return `customUrl(${JSON.stringify(qs.parse(url.parse(p1.replace(/"/g, '')).query))})`; }) }, afterEach: (hermione) => { const { outputFilePath } = hermione.geminiMigrator; console.log(`Migrated file: ${outputFilePath}`); } } } };
Debug
Known issues
gotchaPlugin requires hermione to be installed and configured; ensure hermione is a dependency.
fix
npm i -D hermione
affects: >=0.1.0
gotchaThe 'enabled' option defaults to false; migration only runs when enabled:true or CLI flag --gemini-migrate is passed.
fix
Set enabled: true in config or use CLI flag: npx hermione --gemini-migrate
affects: >=0.1.0
gotchaCommand replacers operate on raw code strings; incorrect regex can break test syntax.
fix
Test replacers on sample gemini test code to verify output.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: Cannot read property 'geminiMigrator' of undefined
Plugin not enabled or correctly registered in hermione config.
fix
Ensure config has 'hermione-gemini-migrator' plugin entry with enabled: true.
Error: No files matched patterns: **/*.gemini.js
No gemini test files found in the project directory.
fix
Verify inputPatterns option points to correct glob pattern, or create sample .gemini.js files.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
hermionerequiredRuntime peer dependency for migration plugin
Agent activity
15 hits · last 30 days
node
14
Resources
hermione-gemini-migrator — npm install hermione-gemini-migrator · libregistry