Spaces:
Sleeping
Sleeping
File size: 871 Bytes
c83ce29 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import sys
import os
src_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(f"{src_path}/tools")
from utilities import read_markdown_file
def setup_jest() -> str:
"""
Automates the setup of Jest with TypeScript and code coverage in a new project.
Returns:
str: A comprehensive guide for Jest setup, including TypeScript
integration and code coverage configuration, generated by the AI.
Returns an error message string if an exception occurs.
"""
try:
output = read_markdown_file(f'{src_path}/prompts/setup_jest_sample_response_v2.md')
return output
except Exception as exc:
return f"Error during Jest setup: {exc}"
# For testing/debugging
if __name__ == "__main__":
print("Setting up Jest...")
output = setup_jest()
print("\n" + output)
|