0.1.2 • Published 6 years ago

benderjs-yui-beautified v0.1.2

Weekly downloads
23
License
MIT
Repository
github
Last release
6 years ago

benderjs-yui-beautified

Adds assertions beautified assertions to the Bender.js. This plugin utilizes js-beautify to format data.

Requirements

This plugin requires benderjs-yui plugin to work correctly.

API

Adds bender.assert.beautified namespace containing following members:

html

Parameters:

  • expected - Expected value.
  • actual - Actual value.
  • msg - optional - Message passed to the bender.assert.areEqual assertion.

Examples

bender.assert.beautified.html( '<p>aaa aaaa</p>', '<p>aaa    aaaa</p>' ); // Pass
bender.assert.beautified.html( '<p>aaa aaaa</p>', '<p>aaaaaaa</p>' ); // Fails

js

Parameters:

  • expected - Expected value.
  • actual - Actual value.
  • msg - optional - Message passed to the bender.assert.areEqual assertion.

Examples

bender.assert.beautified.js( 'var aaa = 3;', 'var aaa =    3;' ); // Pass
bender.assert.beautified.js( 'var aaa = 3;', 'var aaa =    33;' ); // Fails

Config

You can also adjust formatting configuration in your bender.js config file.

'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.

0.1.2

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.6

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago