Giter VIP home page Giter VIP logo

proof's Introduction

proof

@proof-ui TypeScript JavaScript License
issues Forks

Storybook is a great tool for developing components -- and while simulated and snapshot based testing can get you pretty far, there's no substitution for the real thing. proof is a tapable integration testing library for your stories.

Usage

The quickest way to get started is to use the proof-cli.

npm i --save-dev @proof-ui/cli

Inspired by ava proof exposes a concise API for authoring tests:

import test, { assert } from '@proof-ui/test';

test({ kind: 'Components|Button', story: 'Basic' }, async ({ browser }) => {
  // Use the browser object to test your component
  assert(true === true);
});

Or mirror storybook to make it easy to cross-reference tests between files.

import { proofsOf } from '@proof-ui/test';
import assert from 'power-assert';

const proofs = proofsOf('Components|Button');

proofs.add('Basic', async ({ browser }) => {
  // Use the browser object to test your component
  assert(true === true);
});

Running your tests

Add proof as a test script in your package.json

{
  "scripts": {
    "test": "proof"
  }
}

And call it

npm test

Proof will run against a local chrome instance by default, but can be configured to target any number of local, remote, or headless browsers.

Configuration

Create a proof.config.js file in your package's root folder or use the -c, --conf option on the command line to specify a different one.

Plugins

At it's core, proof uses tapable and exposes many hooks to allow complete control over the entire test life-cycle.


Contributing and Usage

Please read the contributing and code of conduct document.

Clone the repo:

git clone https://github.com/intuit/proof.git

Go to the newly cloned repo, and download dependencies:

cd proof
yarn

Build the project:

yarn build

proof's People

Contributors

adierkens avatar hipstersmoothie avatar akashprasher avatar andys1988 avatar cagoncil avatar digikin avatar drsensor avatar pragsanshi avatar hainessss avatar tylerkrupicka avatar

Watchers

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.