fix: update ESLint check and test expectations

This commit is contained in:
Paul Gauthier (aider) 2024-09-04 13:57:09 -07:00
parent edd9b44ad3
commit d8027030b0
2 changed files with 4 additions and 1 deletions

View file

@ -43,6 +43,9 @@ class Linter:
self.languages["typescript"] = f'"{eslint_file}" --format unix'
return
# If no ESLint is found, set typescript to None
self.languages["typescript"] = None
def set_linter(self, lang, cmd):
if lang:
self.languages[lang] = cmd

View file

@ -37,7 +37,7 @@ class TestLinter(unittest.TestCase):
def test_get_rel_fname(self):
self.assertEqual(self.linter.get_rel_fname("/test/root/file.py"), "file.py")
self.assertEqual(self.linter.get_rel_fname("/other/path/file.py"), "/other/path/file.py")
self.assertEqual(self.linter.get_rel_fname("/other/path/file.py"), "../../other/path/file.py")
@patch("subprocess.Popen")
def test_run_cmd(self, mock_popen):