
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Pretest is a testing framework for Preact inspired by Enzyme.
It features similar intuitive API, lazy evaluation for better performance, and testing with and without DOM.
Pretest is testing framework agnostic - meaning you can use it with any testing framework, be it Jasmine, Mocha, Jest, AVA or anything else.
Pretest's core logic is also platform agnostic - meaning it can be used with different Virtual Dom platform like Inferno, virtual-dom and others (provided platform definitions exists). See Contributing guidelines if you'd like to implement new platform.
Installing Pretest is straightforward. Using npm:
npm install pretest -d
or yarn:
yarn add pretest -D
If you wish to use mounted renderers (mount
and shallowMount
) DOM implementation must be available to pretest. That means running tests either in browser or using DOM implementation like jsdom.
Visit API and Examples for further reading.
Basic example:
import { h } from 'preact'
import { by, shallowMount, json } from 'pretest'
import App from './App'
import HomePage from './HomePage'
describe('App', () => {
it('should render Home page.', () => {
const wrapper = shallowMount(<App />)
expect(wrapper.contains(by.jsx(<HomePage loaded />))).toEqual(true)
})
it('should render three links.', () => {
const wrapper = json(<App />)
const links = wrapper.find(by.name('a'))
expect(links.length()).toEqual(3)
})
})
What's planned:
FAQs
Testing framework for Preact inspired by Enzyme.
We found that pretest 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.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.