]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blobdiff - spec/pronto/eslint_spec.rb
added ability to set config opts to eslint (#9)
[github/fretlink/pronto-hlint.git] / spec / pronto / eslint_spec.rb
index a00a05b519656393d6bb898916491e6832bc1e5b..0924f30177dec26d75a5d626f5462f175f924ff5 100644 (file)
@@ -57,6 +57,15 @@ module Pronto
           end
         end
 
+        context(
+          'with cmd_line_opts to include .html',
+          config: { 'cmd_line_opts' => '--ext .html' }
+        ) do
+          it 'returns correct number of errors' do
+            expect(run.count).to eql 5
+          end
+        end
+
         context(
           'with different eslint executable',
           config: { 'eslint_executable' => './custom_eslint.sh' }
@@ -139,6 +148,16 @@ module Pronto
           expect(eslint_command_line).not_to include(path)
         end
       end
+      
+      context(
+        'with some command line options',
+        config: { 'cmd_line_opts' => '--my command --line opts' }
+      ) do
+        it 'includes the custom command line options' do
+          eslint.read_config
+          expect(eslint_command_line).to include('--my command --line opts')
+        end
+      end
     end
   end
 end