componium-test

1.0.4 • Public • Published

ct // Componium Test - JavaScript testing framework

ct (componium-test) is a simple JavaScript testing full-stack framework

Features

  • Runs tests in node.js and in the browser.
  • Powered by Chai.js assertions.
  • Mocking powered by the Sinon.js library.

Public API

Here's an example of available APIs for this framework:

// include the framework
import ct, { assert } from "componium-test";

// create test suites
ct({
  // set the title
  describe: "Unit test suite two",
    
  // before functions  
  before: () => {
    console.log("called before");
  },
  beforeEach: () => {
    console.log("called beforeEach");
  },
  "your test": async function () {
    // add logic relevant to your components here  
    assert.equal(2, 2, "2 is 2");
  },
  
  // after methods  
  afterEach: () => {
    console.log("called afterEach");
  },
  after: () => {
    console.log("called after");
  },
});

Release History

See the CHANGELOG.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i componium-test

Weekly Downloads

7

Version

1.0.4

License

MIT

Unpacked Size

24.5 kB

Total Files

33

Last publish

Collaborators

  • vladikoff