fix: Apply black formatting to resolve CI formatting issues
This commit is contained in:
@@ -30,7 +30,9 @@ class JestGenerator:
|
||||
self.output_dir = Path(output_dir)
|
||||
self.mock_server_url = mock_server_url
|
||||
self.env = Environment(
|
||||
loader=FileSystemLoader(str(Path(__file__).parent.parent.parent / "templates" / "jest")),
|
||||
loader=FileSystemLoader(
|
||||
str(Path(__file__).parent.parent.parent / "templates" / "jest")
|
||||
),
|
||||
trim_blocks=True,
|
||||
lstrip_blocks=True,
|
||||
)
|
||||
@@ -113,7 +115,7 @@ class JestGenerator:
|
||||
endpoint_path = endpoint["path"]
|
||||
endpoint_method = endpoint["method"]
|
||||
|
||||
test_code = f'''
|
||||
test_code = f"""
|
||||
describe('{describe_name}', () => {{
|
||||
it('should {endpoint_method.upper()} {endpoint_path}', async () => {{
|
||||
const response = await request(baseUrl)
|
||||
@@ -122,7 +124,7 @@ describe('{describe_name}', () => {{
|
||||
expect([200, 201, 204]).toContain(response.status);
|
||||
}});
|
||||
}});
|
||||
'''
|
||||
"""
|
||||
return test_code
|
||||
|
||||
def _generate_test_name(self, endpoint: Dict[str, Any]) -> str:
|
||||
@@ -161,7 +163,7 @@ describe('{describe_name}', () => {{
|
||||
parts.append(f'{param_name}="test_{param_name}"')
|
||||
|
||||
elif param["in"] == "query":
|
||||
parts.append(f'{param_name}')
|
||||
parts.append(f"{param_name}")
|
||||
|
||||
if parts:
|
||||
return ", {" + ", ".join(parts) + "}"
|
||||
|
||||
Reference in New Issue
Block a user