Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File extension is not supported #47

Open
mnyon-grandkru opened this issue Jun 24, 2023 · 3 comments
Open

File extension is not supported #47

mnyon-grandkru opened this issue Jun 24, 2023 · 3 comments

Comments

@mnyon-grandkru
Copy link

I'm currently running pythagora on a React codebase written in TypeScript and running into issues running the following command.
I've tried App.tsx as well; I'm reporting this here and my goal is to go over my codebase.

mnyon@Maximal:~/src/friends/queerglobal/qg-frontend-v2$ npx pythagora --unit-tests --path ./src/App.ts
Generating unit tests...
Error: File extension is not supported
    at traverseDirectory (/home/mnyon/src/friends/queerglobal/qg-frontend-v2/node_modules/pythagora/src/helpers/unitTests.js:213:73)
    at async generateTestsForDirectory (/home/mnyon/src/friends/queerglobal/qg-frontend-v2/node_modules/pythagora/src/helpers/unitTests.js:271:5)
Bash script exited with code 0
@LeonOstrez
Copy link
Member

Hi @mnyon-grandkru thank you for trying out Pythagora! We do not support typescript at the moment. We implemented it last week, but still didn't finish testing. Typescript support might be live today or tomorrow, I will keep you updated here!

@LeonOstrez
Copy link
Member

Hey @mnyon-grandkru we released new version of Pythagora (0.0.71) and now we support TypeScript for generating unit tests! I hope you will give it a try and give us some feedback! Let me know if you encounter any issues.

@lvsanche
Copy link

lvsanche commented Jun 27, 2023

One thing I've started to notice is that when mock data is generated, the types are still not complete
for example I have an extensive type for User but the generated testUser array only has two properties so when I try and run the test it will not transpile or run since the types are not adhered to.

For now, having pythagora write tests for the transpiled typescript is more effective and has less errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants