summaryrefslogtreecommitdiff
path: root/test/test_eslint_executable_detection.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-26 10:02:48 +0100
committerw0rp <devw0rp@gmail.com>2017-05-26 10:02:48 +0100
commit7fe1119cf1154480d8035a078ff06d6739892551 (patch)
treea7f22201a5e75336858e9c37f81b33e8752ad1fe /test/test_eslint_executable_detection.vader
parentc89587785b6fc4cba844b7eda2dbd65d15185374 (diff)
downloadale-7fe1119cf1154480d8035a078ff06d6739892551.zip
#576 Run the eslint.js file created by React with node on Windows
Diffstat (limited to 'test/test_eslint_executable_detection.vader')
-rw-r--r--test/test_eslint_executable_detection.vader12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_eslint_executable_detection.vader b/test/test_eslint_executable_detection.vader
index 254150a9..c8c4cc1d 100644
--- a/test/test_eslint_executable_detection.vader
+++ b/test/test_eslint_executable_detection.vader
@@ -7,6 +7,7 @@ Before:
runtime ale_linters/javascript/eslint.vim
After:
+ let g:ale_has_override = {}
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_use_global = 0
@@ -63,3 +64,14 @@ Execute(eslint_d should be detected correctly):
\ ale#handlers#eslint#GetExecutable(bufnr(''))
:q
+
+Execute(eslint.js executables should be run with node on Windows):
+ silent noautocmd new eslint-test-files/react-app/subdir/testfile.js
+ let g:ale_has_override['win32'] = 1
+
+ " We have to execute the file with node.
+ AssertEqual
+ \ 'node '''
+ \ . g:dir . '/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'
+ \ . ''' -f unix --stdin --stdin-filename %s',
+ \ ale_linters#javascript#eslint#GetCommand(bufnr(''))