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

test-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-js

A simple console API based unit test suite

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

test.js

A simple console API based unit test suite running on node.js and the browser, making testing simple and fun (again). It’s not meant to be a feature-rich testing framework but made for simple and lightweight unit tests.

Download

To get going with test.js you can:

  • Download the latest release
  • Install with Bower: bower install test-js
  • Install with npm: npm install test-js

Usage

Creating suites and tests

You can create test suites containing multiple tests according to the following pattern.

test.suite('NAME OF YOUR SUITE', {
	…
    'DESCRIPTION': [EXPRESSION, EXPECTION],
	…
});

It’s actually pretty straight-forward…

test.suite('Demo Suite', {
	'true is true': [true, true],
	'false is true': [false, true],
	'one is equal to one': [1, 1],
	'one is equal to two': [1, 2]
});

node.js

var test = require('./test.js');

test.suite('Demo Suite', {
	…
});

example.js within this repository contains an extensive node.js example.

node.js screenshot

Browser

<script src="test.js"></script>
<script>
test.suite('Demo Suite', {
	…
});
</script>

example.html within this repository contains an extensive browser example.

Browser screenshot

Changelog

  • 0.0.4
    • Update docs
  • 0.0.3
    • Bower support
    • npm support
    • Remove black CLI color to support dark themes
  • 0.0.2
    • AMD support
  • 0.0.1
    • Initial version

License

Copyright (c) 2014 websperts
Licensed under the MIT license.

See LICENSE for more info.

Keywords

FAQs

Package last updated on 19 Nov 2014

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