All Projects → featurist → Browser Monkey

featurist / Browser Monkey

Reliable DOM testing

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Browser Monkey

Karma
Spectacular Test Runner for JavaScript
Stars: ✭ 11,591 (+21769.81%)
Mutual labels:  mocha, karma, browser
Dom
Modern DOM API.
Stars: ✭ 88 (+66.04%)
Mutual labels:  dom, css-selector
Karma-mocha-example
Karma to drive mocha
Stars: ✭ 19 (-64.15%)
Mutual labels:  mocha, karma
Css Select
a CSS selector compiler & engine
Stars: ✭ 279 (+426.42%)
Mutual labels:  dom, css-selector
CDom
Simple HTML/XML/BBCode DOM component for PHP.
Stars: ✭ 26 (-50.94%)
Mutual labels:  dom, css-selector
generator-speedseed
Oriented to components, allow create/choice template, multiple configuration with easy maintenance
Stars: ✭ 13 (-75.47%)
Mutual labels:  mocha, karma
tropic
🍍 Test Runner Library
Stars: ✭ 29 (-45.28%)
Mutual labels:  mocha, karma
Unit Test Demo
一步一步介绍如何给项目添加单元测试
Stars: ✭ 766 (+1345.28%)
Mutual labels:  mocha, karma
Mocha
☕️ simple, flexible, fun javascript test framework for node.js & the browser
Stars: ✭ 20,986 (+39496.23%)
Mutual labels:  mocha, browser
Jsdom Global
Enable DOM in Node.js
Stars: ✭ 431 (+713.21%)
Mutual labels:  mocha, dom
vue-webpack-boilerplate
A webpack boilerplate with vue-loader, axios, vue-router and vuex
Stars: ✭ 51 (-3.77%)
Mutual labels:  mocha, karma
Cosha
Colorful shadows for your images. 🎨
Stars: ✭ 988 (+1764.15%)
Mutual labels:  browser, dom
Jshistory Cn
🇨🇳 《JavaScript 二十年》中文版
Stars: ✭ 3,686 (+6854.72%)
Mutual labels:  mocha, browser
react-ssr-spa
Server side rendered single page app using reactjs official libraries.
Stars: ✭ 30 (-43.4%)
Mutual labels:  mocha, karma
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+211.32%)
Mutual labels:  mocha, karma
ElementFinder
Fetch data from HTML and XML via xpath/css and prepare it with regexp
Stars: ✭ 29 (-45.28%)
Mutual labels:  dom, css-selector
Cookiecutter Webpack
Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.
Stars: ✭ 87 (+64.15%)
Mutual labels:  mocha, karma
163music
🎵163 music web app built with Vue 2.6, server side render, webpack 4
Stars: ✭ 139 (+162.26%)
Mutual labels:  mocha, karma
Wpt
Test suites for Web platform specs — including WHATWG, W3C, and others
Stars: ✭ 3,573 (+6641.51%)
Mutual labels:  browser, dom
Karma Event Driver Ext
use webdriverio like api in browser with karma lol
Stars: ✭ 17 (-67.92%)
Mutual labels:  karma, browser

browser monkey npm version npm CircleCI Gitter chat

Reliable DOM testing

npm install browser-monkey

Browser Monkey is a DOM assertion library. It helps you write framework agnostic browser tests that are reliable in the face of asynchronous behaviours like animations, AJAX and delayed rendering. It also helps you to write tests that exhibit the semantic meaning of the page, as opposed to a jumble of CSS selectors.

  • automatically waits for commands and assertions.
  • create rich DSLs for your page structure.
  • framework agnostic: works with React, Angular, jQuery, Hyperdom and many many more.
  • can simulate text entry and clicks.
  • returns promises that resolve when the elements are found.

Here is an example project that demonstrates how to use browser-monkey with Karma.

@dereke has made an excellent video of a TDD session using browser-monkey.

Docs

Docs Website

example

import createMonkey from "browser-monkey/create";
import createTestDiv from "browser-monkey/lib/createTestDiv";
import hyperdom from "hyperdom";
import App from "./app";

describe("beer app", () => {
  let page;

  beforeEach(() => {
    const $testContainer = createTestDiv();
    hyperdom.append($testContainer, new App());
    page = createMonkey($testContainer);
  });

  it("greets me", async () => {
    await page.find("h1").shouldHave({ text: "Hello Lubbers" });
  });

  it("shows me beer", async () => {
    await page.click("Beer");
    await page.shouldHave({ text: "Punk IPA" });
  });
});

Run this example

We're hiring!

Join our remote team and help us build amazing software. Check out our career opportunities.

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].