qunit-fixture
This utility is fixture for QUnit.
Why use it?
If you have to use fixture It has some ways.
#fixture
.
1. Add html in 1
This case has some cons. fixture
is too hard to read and maintain If I have many fixture. For example. It can't know fixture
in testcase. So. I search for #fixture
in html but It is hard to search.
append
or ....
2. Append html using ;
This case has resolve uppon problem. but I feel like a hack.
So. I made fixture
. If you use fixture
you can easy use fixture
.
How to use it?
install
npm install qunit-fixture
or
bower install qunit-fixture
setup
method
QUnit.fixture
- parameter : (String) html
- return : (NodeList) childNodes for
#fixture
sample
{ var currentWidth = documentstylewidth; documentstylewidth = currentWidth + 10;} QUnit;