Skip to content

Commit b4a79c4

Browse files
committed
C-c C-b td: Implemented toggle-deffered
1 parent e123fab commit b4a79c4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

buster-mode.el

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1+
(defun buster-go-to-current-test ()
2+
(search-backward-regexp "\"[^ ]* .+\": function"))
3+
4+
(defun buster-toggle-deffered ()
5+
(interactive)
6+
(buster-go-to-current-test)
7+
(forward-char 1)
8+
(if (looking-at "//")
9+
(delete-char 2)
10+
(insert "//")))
11+
12+
(global-set-key (kbd "C-c C-b td") 'buster-toggle-deffered)
13+
114
(provide 'buster-mode)

features/buster-mode.feature

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,16 @@ Feature: Toggle deferred
1515
And I go to the front of the word "assert"
1616
And I press "C-c C-b td"
1717
Then I should see "//contains"
18+
19+
Scenario: Undeferring a test
20+
When I insert:
21+
"""
22+
buster.testCase('Building Page', {
23+
"//contains title after loading page": function () {
24+
assert.match(document.body.innerHTML, "Zombie TDD");
25+
}
26+
});
27+
"""
28+
And I go to the front of the word "assert"
29+
And I press "C-c C-b td"
30+
Then I should not see "//contains"

0 commit comments

Comments
 (0)