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

aot-test-generators

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aot-test-generators

Generate test suites for checks that already happened at build-time

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

aot-test-generators

Build Status npm

Generate test suites for checks that already happened at build-time

Install

npm install --save aot-test-generators

Usage

const testGenerators = require('aot-test-generators');

let test = testGenerators.qunit.test('5 is not 42', true);

console.log(test);
// QUnit.test('test-name', function(assert) {
//   assert.expect(1);
//   assert.ok(true, 'assertion-message');
// });

aot-test-generators currently supports:

  • Mocha (exported as mocha).
  • QUnit (exported as qunit)

API

test(testName, passed, [assertionMessage])

Generates code for passing and failing tests.

testName

Type: string

Name of the test.

passed

Type: boolean

true generates a passing test, false generates a failing test.

assertionMessage

Type: string
Default: same as testName

Assertion message inside of the test.

suiteHeader(suiteName)

Generates test suite header code.

suiteName

Type: string

Name of the test suite.

suiteFooter()

Generates test suite footer code (if necessary).

License

This project is licensed under the Apache License 2.0.

FAQs

Package last updated on 04 May 2017

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