Skip to content

Commit 1fc005a

Browse files
committed
Merge pull request burnettk#6 from nkoehring/master
additional path for alternating files
2 parents 8e4eca8 + cf5ef00 commit 1fc005a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

plugin/angular.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ function! s:Alternate(cmd) abort
152152
let l:newpaths = [substitute(l:currentpath, "app/js", "test/unit", ""), substitute(substitute(l:currentpath, "app/js", "test/unit", ""), ".js", "Spec.js", "")]
153153
elseif l:currentpath =~ "public/js"
154154
let l:newpaths = [substitute(l:currentpath, "public/js", "test/karma/unit", ""), substitute(substitute(l:currentpath, "public/js", "test/karma/unit", ""), ".js", ".spec.js", "")]
155+
elseif l:currentpath =~ "frontend/src"
156+
let l:newpaths = [substitute(substitute(l:currentpath, "frontend/src", "tests/frontend", ""), ".js", ".spec.js", "")]
157+
elseif l:currentpath =~ "tests/frontend"
158+
let l:newpaths = [substitute(substitute(l:currentpath, "tests/frontend", "frontend/src", ""), ".spec.js", ".js", "")]
155159
endif
156160

157161
if l:newpaths != []

0 commit comments

Comments
 (0)