summaryrefslogtreecommitdiff
path: root/test/test_eslint_executable_detection.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-25 22:34:59 +0100
committerw0rp <devw0rp@gmail.com>2017-05-25 22:34:59 +0100
commit3840cebbc49a64a93e1a6674158f0d7e5372f9f1 (patch)
treeda08d94682461288fa0cee64c1c6dcd364bbdb39 /test/test_eslint_executable_detection.vader
parentc31cd12bdd941e9a326d89b21d187224c661c485 (diff)
downloadale-3840cebbc49a64a93e1a6674158f0d7e5372f9f1.zip
Automatically use eslint_d for eslint, when available
Diffstat (limited to 'test/test_eslint_executable_detection.vader')
-rw-r--r--test/test_eslint_executable_detection.vader17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/test_eslint_executable_detection.vader b/test/test_eslint_executable_detection.vader
index 03bb89e8..254150a9 100644
--- a/test/test_eslint_executable_detection.vader
+++ b/test/test_eslint_executable_detection.vader
@@ -16,7 +16,7 @@ After:
call ale#linter#Reset()
Execute(create-react-app directories should be detected correctly):
- new eslint-test-files/react-app/subdir/testfile.js
+ silent noautocmd new eslint-test-files/react-app/subdir/testfile.js
AssertEqual
\ g:dir . '/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js',
@@ -27,7 +27,7 @@ Execute(create-react-app directories should be detected correctly):
Execute(use-global should override create-react-app detection):
let g:ale_javascript_eslint_use_global = 1
- new eslint-test-files/react-app/subdir/testfile.js
+ silent noautocmd new eslint-test-files/react-app/subdir/testfile.js
AssertEqual
\ 'eslint_d',
@@ -36,7 +36,7 @@ Execute(use-global should override create-react-app detection):
:q
Execute(other app directories should be detected correctly):
- new eslint-test-files/other-app/subdir/testfile.js
+ silent noautocmd new eslint-test-files/other-app/subdir/testfile.js
AssertEqual
\ g:dir . '/eslint-test-files/node_modules/.bin/eslint',
@@ -47,10 +47,19 @@ Execute(other app directories should be detected correctly):
Execute(use-global should override other app directories):
let g:ale_javascript_eslint_use_global = 1
- new eslint-test-files/other-app/subdir/testfile.js
+ silent noautocmd new eslint-test-files/other-app/subdir/testfile.js
AssertEqual
\ 'eslint_d',
\ ale#handlers#eslint#GetExecutable(bufnr(''))
:q
+
+Execute(eslint_d should be detected correctly):
+ silent noautocmd new eslint-test-files/app-with-eslint-d/testfile.js
+
+ AssertEqual
+ \ g:dir . '/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d',
+ \ ale#handlers#eslint#GetExecutable(bufnr(''))
+
+ :q