Created
March 30, 2015 13:50
-
-
Save code0100fun/6f87155564ccf3724749 to your computer and use it in GitHub Desktop.
Using custom QUnit assertions with Ember CLI
This file contains 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
// tests/test-helper.js | |
import QUnit from 'qunit'; | |
QUnit.assert.trimEq = function(actual, expected) { | |
var trimActual = actual.replace(/^\s+|\s+$/g,''); | |
this.equal(trimActual, expected); | |
}; | |
// tests/unit/components/*.js | |
assert.trimEq(this.$().text(), 'foo'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment