benderjs-yui
Adapter for YUI3 testing framework for Bender.js.
Installation
npm install benderjs-yui
Usage
Add benderjs-yui
to the plugins array in the bender.js
configuration file:
var config = applications: ... browsers: ... plugins: 'benderjs-yui' // load the plugin tests: ...; moduleexports = config;
Set yui
as a framework
for entire project or a specific tests group:
var config = applications: ... browsers: ... framework: 'yui' // use for entire project plugins: 'benderjs-yui' tests: Foo: basePath: '' framework: 'yui' // use for a specific tests group paths: ... ; moduleexports = config;
API
To run a test case use bender.test
API:
bender;
Some of YUI
namespaces were exposed in bender
namespace, at the moment you can use:
bender.Y
->Y
bender.assert
->Y.Assert
bender.objectAssert
->Y.ObjectAssert
bender.arrayAssert
->Y.ArrayAssert
Features
- single test execution
- nested test suites
Using nested test suites
You may create multiple nested suites.
To do so, in test suite passed to bender.test
create an object containing property suite
set to true.
bender;
If you provide setUp
or tearDown
functions, they will be fired for all tests in the suite, but not for the tests in nested suites.
License
MIT, for license details see: LICENSE.md.