forked from vim-test/vim-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcucumberjs7+_spec.vim
58 lines (44 loc) · 1.18 KB
/
cucumberjs7+_spec.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
source spec/support/helpers.vim
describe "CucumberJS - 7+"
before
cd spec/fixtures/cucumberjs7+
end
after
call Teardown()
cd -
end
it "runs selected scenario tests"
view +6 features/normal.feature
TestNearest
Expect g:test#last_command == 'cucumber-js features/normal.feature:6'
end
it "runs nearest scenario tests"
view +7 features/normal.feature
TestNearest
Expect g:test#last_command == 'cucumber-js features/normal.feature:6'
end
it "runs file tests"
view features/normal.feature
TestFile
Expect g:test#last_command == 'cucumber-js features/normal.feature'
end
it "runs test suites"
view features/normal.feature
TestSuite
Expect g:test#last_command == 'cucumber-js'
end
it "uses locally installed cucumber-js"
try
!mkdir -p node_modules/.bin
!touch node_modules/.bin/cucumber-js
view features/normal.feature
TestSuite
Expect g:test#last_command == 'node_modules/.bin/cucumber-js'
finally
" play it safe with the removal of files (i.e. no rm -rf)
!rm node_modules/.bin/cucumber-js
!rmdir node_modules/.bin
!rmdir node_modules
endtry
end
end