Skip to content

Commit f3fe2dd

Browse files
committed
Support hipster quotes.
1 parent b4a79c4 commit f3fe2dd

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

buster-mode.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
(defun buster-go-to-current-test ()
2-
(search-backward-regexp "\"[^ ]* .+\": function"))
1+
(defun buster-goto-current-test ()
2+
(search-backward-regexp "[\"'][^ ]* .+[\"']: function" nil t))
33

44
(defun buster-toggle-deffered ()
55
(interactive)
6-
(buster-go-to-current-test)
6+
(buster-goto-current-test)
77
(forward-char 1)
88
(if (looking-at "//")
99
(delete-char 2)

features/buster-mode.feature

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@ Feature: Toggle deferred
2828
And I go to the front of the word "assert"
2929
And I press "C-c C-b td"
3030
Then I should not see "//contains"
31+
32+
Scenario: Deferring a single quoted test
33+
When I insert:
34+
"""
35+
buster.testCase('Building Page', {
36+
'contains title after loading page': function () {
37+
assert.match(document.body.innerHTML, "Zombie TDD");
38+
}
39+
});
40+
"""
41+
And I go to the front of the word "assert"
42+
And I press "C-c C-b td"
43+
Then I should see "'//contains"

0 commit comments

Comments
 (0)