Web Atoms Unit Testing
Simple Unit testing framework for web atoms.
Dependencies
typescript
Please make sure, decorator support is enabled for your tests.
Installation
npm install web-atoms-unit
Running with Node
Create a run-tests.js
file
var fs = ; var vm = ; { var s = fs; var script = s filename: file ; script; } // load web atoms mock ; // load web atoms mvvm ; // load web atoms unit ; // load your tests.. // ideally all typescript files should be transpiled into // one js file ; // .. so on.. you can write a script to load many files.... var p = WebAtomsUnitTestRunnerinstance; p; p;
// run all tests node run-tests.js // run tests by filtering categories provided by comma separated categories node run-tests.js categories,categories // run tests by filtering categories provided by regular expressions node run-tests.js /regex/i
Running with browser
Sample Test class
/// <reference path="./node_modules/web-atoms-unit/index.d.ts"> ; ; ; ;