Code Monkey home page Code Monkey logo

testerrific's Introduction

Testerrific

The absolute best, fastest, easiest way test your site

Features

  • Simple syntax: Write tests as simply as tt.test("a < 4")

  • Flexible: Test anything that resolves truthy or falsey, no need to adjust your code.

  • Powerful: Tons of settings give you control over how each test runs, giving you the power to test any situation.

  • Reactive: Change the test data and the UI will keep up automatically, which helps a lot with on-the-fly tweaks and the trial-and-error phase of writing tests.

  • Intuitive UI: Disable tests, pause execution, run individual tests/functions on demand, all without having to go back to your code to change settings.

  • Async friendly: Support for promises and auto-retry means your tests won't get ahead of your code.

  • Helper Functions: Control and respond to your tests with a large assortment of helper functions and triggers.

  • Lightweight & dependency-free Testerrific weighs only 8.5kb gzipped (5.7kb JS, 2.8kb CSS).

Getting Started

Installation

To get Testerrific working, just link to the Testerrific JS and CSS files:

<!-- Download and link to the files locally: -->
<script src="testerrific.min.js"></script>
<link rel="Stylesheet" href="testerrific.min.css" type="text/css" />

<!-- Or use the jsdelivr CDN: -->
<script src="https://cdn.jsdelivr.net/gh/thomhines/testerrific@master/testerrific.min.js"></script>
<link rel="Stylesheet" href="https://cdn.jsdelivr.net/gh/thomhines/testerrific@master/testerrific.min.css" type="text/css" />

then write some tests...

Basic Usage

Tests are saved as an array. Testerrific uses a "reactive" UI (meaning that changes made to the data saved in the tt objects are shown instantly in the interface), so adding or changing a test in the array will also update the list of tests in the UI.

// Create a group to organize your tests.
// Tests will be added to this group until another test group is created
tt.group('First Test Group');

// Tests are just strings or functions that evaluate as truthy/falsey,
// but there are a *bunch* of options to control how they work
tt.test('1 + 1 == 2');
tt.test("Is today Thursday?", () => { return (new Date()).getDay() == 4; });

Check out the Demo & Docs Site to find out more about how to get the most out of Testerrific.

License

MIT

Acknowledgements

Special thanks to a few folks whose code and libraries inspired some of the ideas built into Testerrific:

  • Testerrific's reactive UI code was built with a lot of help from this article by Chris Ferdinandi at his site Go Make Things
  • Evan You's Vue.js was also a huge influence on making reactive DOM changes as smooth and efficient as possible

Copyright (c) 2021-present, Thom Hines

testerrific's People

Contributors

thomhines avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.