2.5.2 • Published 7 years ago

bundl-jasmine-node v2.5.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

bundl-jasmine-node

Run unit tests directly in Node. No browser needed!

Runs on the amazing Bundl build tool

Testing framework by Jasmine

Runs without a browser via node-as-browser

How to use

unitTests.js

var bundl = require('bundl');
var jasmine = require('bundl-jasmine-node');
var babelProcessor = require('bundl-pack-babel');

var options = {
    slowThreshold: 500 //ms
    pack: {
        js: babelProcessor() // lets you write test code in ES6
    }
};

bundl(['./spec/*'])
    .then(jasmine(options))
    .go();
$ node ./unitTests.js --log=WARN

CLI Options

--log=LEVEL

default: INFO

ERROR - only show progress bar and any resulting errors

WARN - show warning messages and errors

INFO - show the outcome of each test as it runs (default)

--browser

opens in your default OS browser

Compile tests into a standalone JS file and open an html page that runs your tests and outputs to DOM and/or window.console

This URL can be opened by any browser on your machine for testing in any browser

Library Options

slowThreshold

default: 500

If one test takes longer than this threshold to complete, it is flagged as slow and will throw a warning

mockAjax

default: true

set to false to disable mocking XMLHttpRequest and fetch (See jasmine-ajax)

mockTimeouts

default: true

set to false to disable mocking setTimeout and setInterval (See jasmine.clock)

haltOnException

default: true

set to false to allow suite to continue even after throwing an exception

htmlReporter (when using --browser)

default: true

set to false to prevent writing test results into document.body

paths (when using --browser)

Array of Strings telling Bundl how to resolve relative paths

See Bundl

2.5.2

7 years ago

2.5.1

7 years ago

2.5.0

7 years ago

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.4.0

7 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago