Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@hypothesis/frontend-testing
Advanced tools
This package contains common utilities for testing UI components across Hypothesis frontend projects. It includes tools for:
This package is designed to work with downstream projects that use Hypothesis's standard UI and UI testing stack, built on:
This package exports a wrapper around Enzyme's mount
function to render
a component, query its output and interact with it. The function in this
package adds the wrapper to a global list of active wrappers which can then
be conveniently unmounted using unmountAll
at the end of a test.
import { mount, unmountAll } from '@hypothesis/frontend-testing';
describe('MyWidget', () => {
afterEach(() => {
// Clean up by unmounting any wrappers mounted in the current test and
// removing associated DOM containers.
unmountAll();
});
it('should render', () => {
const wrapper = mount(<MyWidget/>);
// Query component content etc.
});
it('should do something that requires component to be connected', () => {
const wrapper = mount(<MyWidget/>, { connected: true });
// Test behavior that relies on rendered component being part of the
// DOM tree under `document.body`.
});
});
FAQs
Frontend testing utilities for Hypothesis projects
We found that @hypothesis/frontend-testing 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.