aboutsummaryrefslogtreecommitdiffhomepage
path: root/spec
diff options
context:
space:
mode:
authorbbsteventill <still3@bloomberg.net>2018-03-31 13:01:17 -0400
committerMarkus Doits <doits@users.noreply.github.com>2018-03-31 19:01:17 +0200
commit12df00b5e5ac8287afad0f2d52aa0f35a6e8a2ee (patch)
tree4e261ede9bd5e6f254aca842b3826b68eddaf1bf /spec
parentf411af6f829477af0bdca765eb5cc3d40c104294 (diff)
downloadpronto-hlint-12df00b5e5ac8287afad0f2d52aa0f35a6e8a2ee.tar.gz
pronto-hlint-12df00b5e5ac8287afad0f2d52aa0f35a6e8a2ee.tar.zst
pronto-hlint-12df00b5e5ac8287afad0f2d52aa0f35a6e8a2ee.zip
added ability to set config opts to eslint (#9)
* added ability to set config opts to eslint * add spec for eslint command line
Diffstat (limited to 'spec')
-rw-r--r--spec/pronto/eslint_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb
index a00a05b..0924f30 100644
--- a/spec/pronto/eslint_spec.rb
+++ b/spec/pronto/eslint_spec.rb
@@ -58,6 +58,15 @@ module Pronto
58 end 58 end
59 59
60 context( 60 context(
61 'with cmd_line_opts to include .html',
62 config: { 'cmd_line_opts' => '--ext .html' }
63 ) do
64 it 'returns correct number of errors' do
65 expect(run.count).to eql 5
66 end
67 end
68
69 context(
61 'with different eslint executable', 70 'with different eslint executable',
62 config: { 'eslint_executable' => './custom_eslint.sh' } 71 config: { 'eslint_executable' => './custom_eslint.sh' }
63 ) do 72 ) do
@@ -139,6 +148,16 @@ module Pronto
139 expect(eslint_command_line).not_to include(path) 148 expect(eslint_command_line).not_to include(path)
140 end 149 end
141 end 150 end
151
152 context(
153 'with some command line options',
154 config: { 'cmd_line_opts' => '--my command --line opts' }
155 ) do
156 it 'includes the custom command line options' do
157 eslint.read_config
158 expect(eslint_command_line).to include('--my command --line opts')
159 end
160 end
142 end 161 end
143 end 162 end
144end 163end