Bender.js plugin adding beautified assertions to the YUI adapter.
npm install benderjs-yui-beautifiedAdds assertions beautified assertions to the Bender.js. This plugin utilizes js-beautify to format data.
This plugin requires benderjs-yui plugin to work correctly.
Adds bender.assert.beautified namespace containing following members:
Parameters:
* expected - Expected value.
* actual - Actual value.
* msg - optional - Message passed to the bender.assert.areEqual assertion.
#### Examples
`` aaa aaaa aaa aaaa aaa aaaa aaaaaaajavascript`
bender.assert.beautified.html( '
bender.assert.beautified.html( '
Parameters:
* expected - Expected value.
* actual - Actual value.
* msg - optional - Message passed to the bender.assert.areEqual assertion.
#### Examples
`javascript`
bender.assert.beautified.js( 'var aaa = 3;', 'var aaa = 3;' ); // Pass
bender.assert.beautified.js( 'var aaa = 3;', 'var aaa = 33;' ); // Fails
You can also adjust formatting configuration in your bender.js config file.
`javascript
'use strict';
var config = {
applications: {
// (...)
},
framework: '(...)',
// (...)
'yui-beautified': {
'indent_with_tabs': true,
// All tags should be reformatted.
'unformatted': 'none'
}
};
module.exports = config;
``
For more config options check the js-beautify package.