summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-15 12:25:15 +0100
committerw0rp <devw0rp@gmail.com>2018-04-15 12:25:15 +0100
commitfb720251bf38139c1811665852e1bc2f73d0393f (patch)
treec8dc084d5f6629ae3739379efdbabd9e2654166e /test
parent60917c900560e92b299ef3443f083334c0e8adcf (diff)
downloadale-fb720251bf38139c1811665852e1bc2f73d0393f.zip
Close #1504 - Add an option for removing --respect-pragma for flow
Diffstat (limited to 'test')
-rw-r--r--test/test_flow_command.vader13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_flow_command.vader b/test/test_flow_command.vader
index 49546e94..c673ce0a 100644
--- a/test/test_flow_command.vader
+++ b/test/test_flow_command.vader
@@ -1,8 +1,11 @@
Before:
runtime ale_linters/javascript/flow.vim
+
call ale#test#SetDirectory('/testplugin/test')
After:
+ unlet! b:ale_javascript_flow_use_respect_pragma
+
call ale#test#RestoreDirectory()
call ale#linter#Reset()
call ale#semver#ResetVersionCache()
@@ -15,6 +18,16 @@ Execute(flow should return a command to run if a .flowconfig file exists):
\ . ' check-contents --respect-pragma --json --from ale %s',
\ ale_linters#javascript#flow#GetCommand(bufnr('%'), [])
+Execute(flow should not use the respect pragma argument if the option is off):
+ call ale#test#SetFilename('flow/a/sub/dummy')
+
+ let b:ale_javascript_flow_use_respect_pragma = 0
+
+ AssertEqual
+ \ ale#Escape('flow')
+ \ . ' check-contents --json --from ale %s',
+ \ ale_linters#javascript#flow#GetCommand(bufnr('%'), [])
+
Execute(flow should should not use --respect-pragma for old versions):
call ale#test#SetFilename('flow/a/sub/dummy')