Skip to content

Commit

Permalink
Merge branch 'master' into typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Thom1729 committed May 15, 2020
2 parents 8aa9166 + 063e195 commit d8688ca
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests/test_syntaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

from unittesting import DeferrableTestCase

from JSCustom.src.build import build_configurations
from sublime_lib import OutputPanel

from JSCustom.src.build import build_configuration
from JSCustom.src.paths import PACKAGE_PATH, USER_DATA_PATH


Expand All @@ -26,8 +28,10 @@ def _test_syntaxes(self, name, configuration, tests):
test_working_path = TESTS_PATH / name
test_working_path.file_path().mkdir(parents=True)

build_configurations({name: configuration}, test_working_path)
output = OutputPanel.create(sublime.active_window(), 'YAMLMacros')

syntax_path = test_working_path / (name + '.sublime-syntax')
build_configuration(name, configuration, syntax_path.file_path(), output)

sublime.run_command('build_js_custom_tests', {
'syntax_path': str(syntax_path),
Expand Down Expand Up @@ -116,3 +120,14 @@ def test_string_object_keys(self):
},
tests=["base", "string_object_keys"],
)

def test_typescript(self):
yield from self._test_syntaxes(
name="typescript",
configuration={
"file_extensions": [],
"hidden": True,
"typescript": True,
},
tests=["base", "typescript"],
)

0 comments on commit d8688ca

Please sign in to comment.