def test_jshint_parse_output_should_return_true_empty_normal_output(self):
     file_path = self.given_a_file_in_test_dir('jshint.xml', '')
     self.options['jenkins'] = 'False'
     linter = JSHint(self.options)
     self.assertFalse(linter.use_jenkins)
     with OutputCapture():
         self.assertTrue(linter.parse_output(open(file_path), 1))
 def test_jshint_parse_output_should_return_false_with_xml_output(self):
     file_path = self.given_a_file_in_test_dir('jshint.xml', XML_OUTPUT)
     self.options['jenkins'] = 'True'
     linter = JSHint(self.options)
     self.assertTrue(linter.use_jenkins)
     with OutputCapture():
         self.assertFalse(linter.parse_output(open(file_path), 1))
Example #3
0
 def test_jshint_parse_output_should_return_true_empty_normal_output(self):
     file_path = self.given_a_file_in_test_dir('jshint.xml', '')
     self.options['jenkins'] = 'False'
     linter = JSHint(self.options)
     self.assertFalse(linter.use_jenkins)
     with OutputCapture():
         self.assertTrue(linter.parse_output(open(file_path), 1))
Example #4
0
 def test_jshint_parse_output_should_return_false_with_xml_output(self):
     file_path = self.given_a_file_in_test_dir('jshint.xml', XML_OUTPUT)
     self.options['jenkins'] = 'True'
     linter = JSHint(self.options)
     self.assertTrue(linter.use_jenkins)
     with OutputCapture():
         self.assertFalse(linter.parse_output(open(file_path), 1))
Example #5
0
 def test_jshint_parse_output_should_return_false_if_warnings_not_suppressed(
         self):  # noqa
     file_path = self.given_a_file_in_test_dir('jshint.xml',
                                               EXPECTED_WARNINGS_OUTPUT)
     self.options['jenkins'] = 'False'
     self.options['jshint-suppress-warnings'] = 'False'
     linter = JSHint(self.options)
     self.assertFalse(linter.use_jenkins)
     with OutputCapture():
         self.assertFalse(linter.parse_output(open(file_path), 1))
 def test_jshint_parse_output_should_return_false_if_warnings_not_suppressed(self):  # noqa
     file_path = self.given_a_file_in_test_dir(
         'jshint.xml',
         EXPECTED_WARNINGS_OUTPUT
     )
     self.options['jenkins'] = 'False'
     self.options['jshint-suppress-warnings'] = 'False'
     linter = JSHint(self.options)
     self.assertFalse(linter.use_jenkins)
     with OutputCapture():
         self.assertFalse(linter.parse_output(open(file_path), 1))