All Projects → lukechilds → react-jsdom

lukechilds / react-jsdom

Licence: MIT license
Render React components to actual DOM nodes in Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-jsdom

test-real-styles
(test-)framework agnostic utilities to test real styling of (virtual) dom elements
Stars: ✭ 37 (+19.35%)
Mutual labels:  jsdom, testing-tools
bibop
Utility for testing command-line tools, daemons, and packages
Stars: ✭ 17 (-45.16%)
Mutual labels:  testing-tools
minimal-hapi-react-webpack
Minimal Hapi + React + Webpack + HMR (hot module reloading) Sandbox
Stars: ✭ 55 (+77.42%)
Mutual labels:  jsdom
Jest Dom
🦉 Custom jest matchers to test the state of the DOM
Stars: ✭ 2,908 (+9280.65%)
Mutual labels:  jsdom
html2md
helloworld 开发者社区开源的一个轻量级,强大的 html 一键转 md 工具,支持多平台文章一键转换,并保存下载到本地。
Stars: ✭ 332 (+970.97%)
Mutual labels:  jsdom
fluttertest
Custom flutter testing CLI tool for individual test runs and group testing
Stars: ✭ 15 (-51.61%)
Mutual labels:  testing-tools
Taiko
A node.js library for testing modern web applications
Stars: ✭ 2,964 (+9461.29%)
Mutual labels:  testing-tools
graphql-query-generator
Generates queries from the GraphQL endpoint via schema introspection.
Stars: ✭ 49 (+58.06%)
Mutual labels:  testing-tools
phptt
phptt a.k.a php test tools
Stars: ✭ 15 (-51.61%)
Mutual labels:  testing-tools
Readability
📚 Turn any web page into a clean view
Stars: ✭ 2,281 (+7258.06%)
Mutual labels:  jsdom
Jsdom
A JavaScript implementation of various web standards, for use with Node.js
Stars: ✭ 16,733 (+53877.42%)
Mutual labels:  jsdom
jsdom-devtools-formatter
Make jsdom elements look like real DOM elements in Chrome Devtools console
Stars: ✭ 40 (+29.03%)
Mutual labels:  jsdom
vision-ui
视觉UI分析工具
Stars: ✭ 165 (+432.26%)
Mutual labels:  testing-tools
papercut
Papercut is a scraping/crawling library for Node.js built on top of JSDOM. It provides basic selector features together with features like Page Caching and Geosearch.
Stars: ✭ 15 (-51.61%)
Mutual labels:  jsdom
go-smtp-mock
SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.
Stars: ✭ 76 (+145.16%)
Mutual labels:  testing-tools
Pywinauto
Windows GUI Automation with Python (based on text properties)
Stars: ✭ 3,175 (+10141.94%)
Mutual labels:  testing-tools
kentan
A modular test data generator for TypeScript
Stars: ✭ 38 (+22.58%)
Mutual labels:  testing-tools
divo
Docker Integration and Validation Orchestrator for Elixir with Mix
Stars: ✭ 31 (+0%)
Mutual labels:  testing-tools
rtl-simple-queries
Simple wrapper queries for @testing-library/react
Stars: ✭ 20 (-35.48%)
Mutual labels:  testing-tools
allure-nunit
Archived - Allure adapter for NUnit framework.
Stars: ✭ 45 (+45.16%)
Mutual labels:  testing-tools

react-jsdom

Render React components to actual DOM nodes in Node.js

Build Status Coverage Status npm

Makes testing simple React components super easy with any Node.js test framework.

Install

npm install --save-dev react-jsdom

Usage

const React = require('react');
const ReactJSDOM = require('react-jsdom');

class Hi extends React.Component {
  render() {
    return (
      <div>
        <span>hi</span>
        <span>{this.props.person}</span>
      </div>
    );
  }

  componentDidMount() {
    console.log('I mounted!');
  }
}

const elem = ReactJSDOM.render(<Hi person="mum"/>);
// console: 'I mounted!'

elem.constructor.name
// 'HTMLDivElement'
elem.nodeName;
// 'DIV');
elem.querySelector('span:last-child').textContent;
// 'mum'
elem.outerHTML;
// <div>
//   <span>hi</span>
//   <span>mum</span>
// </div>

License

MIT © Luke Childs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].