![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
gemini-react
Advanced tools
gemini plugin for simplifying visual regression testing on React + webpack stack.
WARNING: Right now plugin is pretty much at the proof-of-concept stage, do not use in production.
Install plugin using npm
:
npm install gemini-react
Enable it in your gemini config file:
system:
plugins:
react:
webpackConfig: <PATH>
hostname: <HOST NAME>
port: <PORT NUMBER>
webpackConfig
(required) – path to your webpack config. Plugin will use
loaders from this file to build test pages.
hostname
(default: 127.0.0.1) - hostname to run reference test server on.
port
(default: 5432) - port to run test server on.
staticRoot
- directory, which contains your static asset files. Will be
mounted by your test server automatically.
cssFiles
- list of CSS files to include in every test page. Requires
staticRoot
option to be set.
jsModules
- list of additional js modules to include in the test pages.
Relative to project root. This modules will be included into your client
bundle before the rest files.
customizeServer
- path to js file, used to customize the express server.
The file should have a single export, which is function of (app, express)
.
Example:
module.exports = function(app, express) {
app.use(function myMiddleware(req, res, next) {
...
});
}
Use geminiReact
variable instead of gemini
and render(<ReactComponent />)
instead of setUrl
and setCaptureElements
. The rest is the same as vanilla
gemini
:
const MyComponent = require('./path/to/my/component');
geminiReact.suite('my react test', suite => {
suite.render(<MyComponent prop="value" />)
.capture('initial');
});
TIP: To use JSX in your tests, you might need gemini-babel plugin.
You don't need to create the reference pages or run the server, plugin will do everything for you.
If you want to interact with rendered component, use this.renderedComponent
inside your test:
suite.capture('clicked', function(actions) {
actions.click(this.renderedComponent);
});
If you have any test-specific stylesheets, you can include them into the test
page by calling suite.includeCss
:
suite.includeCss('/my-component.css');
FAQs
Wrapper, which simplifies writing gemini tests for react components
The npm package gemini-react receives a total of 0 weekly downloads. As such, gemini-react popularity was classified as not popular.
We found that gemini-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.