Created
July 14, 2015 16:39
-
-
Save DesignByOnyx/1cd07f0007b08f4d1bca to your computer and use it in GitHub Desktop.
Find and replace patterns for updating QUnit tests. Not entirely comprehensive or foolproof, but takes a lot of the manual labor out of upgrading. Run the find/replace combos in order.
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
(\s{2})(module|test) | |
$1QUnit.$2 | |
([\d]+), function \((?:assert)?\) \{([\s]+) | |
function (assert) {$2assert.expect($1);$2 | |
([\"]), function \((?:assert)?\) \{ | |
", function (assert) { | |
(\s)(equal|notEqual|ok|notOk|propEqual|notPropEqual|deepEqual|notDeepEqual|strictEqual|notStrictEqual| | |
expect|throws)\( | |
$1assert.$2( | |
(.expect\(\d+\);)([\r\n] +)([^\s]) | |
$1$2$2$3 | |
(\s{2})setup\: | |
$1beforeEach: | |
(\s{2})teardown\: | |
$1afterEach: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment