mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-23 06:16:43 +00:00
test: add TSX closed issue tests and merge JSON
This commit is contained in:
parent
2398638d34
commit
8ba861435d
@ -407,4 +407,25 @@ index 0000000..7cccc5b 100644
|
||||
-TODO: Render Liquid file
|
||||
{% assign featured_product = all_products["product_handle"] %}
|
||||
{% render "product", product: featured_product %}
|
||||
-{% endcomment %}
|
||||
-{% endcomment %}
|
||||
diff --git a/tests/example_file.tsx b/tests/example_file.tsx
|
||||
index 0000000..7cccc5b 100644
|
||||
--- a/tests/example_file.tsx
|
||||
+++ b/tests/example_file.tsx
|
||||
@@ -1,7 +1,3 @@
|
||||
-// TODO: rename component
|
||||
-export default async function Component() {
|
||||
+export default async function MyComponent() {
|
||||
- /* TODO: Use state here
|
||||
- labels: client */
|
||||
+ const [data, setData] = useState<string>("");
|
||||
|
||||
return (
|
||||
<div>
|
||||
- {/*
|
||||
- TODO: use styled component library
|
||||
- */}
|
||||
+ <StyledComponent>{data}</StyledComponent>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -36,7 +36,7 @@ class NewIssueTests(unittest.TestCase):
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'java'), 2)
|
||||
|
||||
def test_javascript_issues(self):
|
||||
# Includes 1 test for JSON w/ comments, 1 test for JSON5, & 3 tests for TSX
|
||||
# Includes 1 test for JSON with Comments, 1 test for JSON5, 3 tests for TSX.
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 5)
|
||||
|
||||
def test_ruby_issues(self):
|
||||
@ -142,11 +142,9 @@ class ClosedIssueTests(unittest.TestCase):
|
||||
def test_starlark_issues(self):
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'python'), 5)
|
||||
|
||||
def test_json_with_comments_issues(self):
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 2)
|
||||
|
||||
def test_json5_issues(self):
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 2)
|
||||
def test_javascript_issues(self):
|
||||
# Includes 1 test for JSON with Comments, 1 test for JSON5, 3 tests for TSX.
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'javascript'), 5)
|
||||
|
||||
def test_autohotkey_issues(self):
|
||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'autohotkey'), 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user