0.1.2 • Published 11 years ago

xexpect.js v0.1.2

Weekly downloads
6
License
-
Repository
github
Last release
11 years ago

xExpect

Minimalistic wrapper for expectjs. Works both in the browser and in node console

Requirements

expect.js -> https://github.com/LearnBoost/expect.js/

Install

npm install xexpect.js

Usage

xExpect.test('Name for the test', function () {
  //Your expect.js test cases
});

xExpect.test('Another test', function() {
  //More expect.js cases
});


if (xExpect.info().errors) {
    xExpect.printErrors();
} else {
    console.log (xExpect.info().testsRun + ' tests executed without errors');
}

Set up in browser

<!-- Change the files path to suit your directory -->
<script src="../lib/expect.js"></script> <!-- The library requires expect.js | Not included in repository | Check README.md for repository location-->
<script src="../xexpect.js"></script>

Set up in node

//Change the files path to suit your directory
var expect = require ('expect.js');
var xExpect = require('xExpect.js');