Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@charmander/test

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@charmander/test

Basic test organization

  • 0.4.0-pre.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build status

Organizes and runs tests.

Usage

'use strict';

const assert = require('assert');
const test = require('@charmander/test')(module);

test('synchronous test, no return value', () => {
    assert(1 < 2);
});

test('asynchronous test, promise return value', async () => {
    const n = await Promise.resolve(2);
    assert(1 < n);
});

or

const describe = require('@charmander/test/describe')(module);

describe('thing', it => {
    it('behaves', () => {
        assert(1 < 2);
    });
});

Running node path/to/test-module.js will run tests in that module. Test modules export an array of test objects, which have a name property and a .run() method. .run() returns a promise that rejects with a test error or resolves with undefined.

Keywords

FAQs

Package last updated on 02 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc