jdforsythe / testdeck

Object oriented testing

Home Page:https://testdeck.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

testdeck

The JavaScript OOP style tests!

// Use one of the mocha/jest/jasmine test runners:
import { suite, test } from "@testdeck/mocha";
import { suite, test } from "@testdeck/jest";
import { suite, test } from "@testdeck/jasmine";

import { expect } from 'chai';

// And turn your tests from functional:
describe("Hello", function() {
  it("world", function() {
    expect(false).to.be.true;
  });
});

// Into 100% OOP awesomeness:
@suite class Hello {
  @test world() {
    expect(false).to.be.true;
  }
}

// P.S. You can still mix and match!

Packages

This is the monorepo for the testdeck packages.

Build

Clone this repository using

git clone https://github.com/testdeck/testdeck.git

Then from inside the so created testdeck directory run

npm install 

This will install all required dependencies and will also bootstrap lerna.

The following npm scripts are available

  • npm run tslint -- runs tslint on all sources in all available packages
  • npm run tslint-fix -- runs tslint --fix on all sources in all available packages
  • npm test -- run all tests on all available packages

Resources

About

Object oriented testing

https://testdeck.org

License:Apache License 2.0


Languages

Language:TypeScript 94.3%Language:JavaScript 4.9%Language:Shell 0.7%