]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/linter/test_flow.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '56df844d3c39ec494dacc69eae34272b27db185a' as '.vim/bundle/asyncomplete'
[etc/vim.git] / .vim / bundle / ale / test / linter / test_flow.vader
1 Before:
2   call ale#assert#SetUpLinterTest('javascript', 'flow')
3
4 After:
5   call ale#assert#TearDownLinterTest()
6
7 Execute(flow should return a command to run if a .flowconfig file exists):
8   call ale#test#SetFilename('../test-files/flow/a/sub/dummy')
9
10   AssertLinter 'flow',
11   \ ale#Escape('flow')
12   \   . ' check-contents --respect-pragma --json --from ale %s < %t'
13   \   . (!has('win32') ? '; echo' : '')
14
15 Execute(flow should not use the respect pragma argument if the option is off):
16   call ale#test#SetFilename('../test-files/flow/a/sub/dummy')
17
18   let b:ale_javascript_flow_use_respect_pragma = 0
19
20   AssertLinter 'flow',
21   \ ale#Escape('flow')
22   \   . ' check-contents --json --from ale %s < %t'
23   \   . (!has('win32') ? '; echo' : '')
24
25 Execute(flow should should not use --respect-pragma for old versions):
26   call ale#test#SetFilename('../test-files/flow/a/sub/dummy')
27
28   GivenCommandOutput [
29   \ 'Warning: `flow --version` is deprecated in favor of `flow version`',
30   \ 'Flow, a static type checker for JavaScript, version 0.27.0',
31   \]
32   AssertLinter 'flow', [
33   \ ale#Escape('flow') . ' --version',
34   \ ale#Escape('flow')
35   \   . ' check-contents --json --from ale %s < %t'
36   \   . (!has('win32') ? '; echo' : ''),
37   \]
38
39 Execute(flow should not return a command to run if no .flowconfig file exists):
40   call ale#test#SetFilename('../test-files/flow/b/sub/dummy')
41
42   AssertLinterNotExecuted