Created
February 5, 2014 11:53
-
-
Save pifantastic/8822073 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'fixtures' | |
], function (fixtures) { | |
describe('Some unit tests', function () { | |
before(function () { | |
/** | |
* Will add the following HTML to the DOM before running the following tests: | |
* | |
* <form> | |
* <input type="text" class="search"> | |
* </form> | |
*/ | |
fixtures.add('form>input.search[type="text"][value="foo"]'); | |
}); | |
after(function () { | |
// Clears previously created fixtures. | |
fixtures.clear(); | |
}); | |
it('should do something', function () { | |
// Use the .find() method just like jQuery's find() method to get | |
// fixture elements. | |
var input = fixtures.find('input.search'); | |
expect(input.val()).to.equal('foo'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment