Bumping to Projen ^0.60.0 causes Jest Test failure for Python Projects
See original GitHub issueI have a Jest Test that creates a new Python Project as follows:
import { PythonProject } from "projen/lib/python";
...
const pyProject = new PythonProject({
outdir: "packages/test",
authorEmail: "test@test.com",
authorName: "test",
moduleName: "py_subproject",
name: "py-subproject",
version: "0.0.0",
});
When I run this test I get the following error:
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (../../node_modules/projen/src/awscdk/awscdk-app-py.ts:41:38)
at Object.<anonymous> (../../node_modules/projen/src/awscdk/index.ts:3:1)
What is very strange is that projen/src/**
does not exist in node_modules and nowhere in my code am I creating an awscdk-app-py
.
This occurs when bumping versions to ^0.60.0 and is caused by this commit: https://github.com/projen/projen/commit/e5cc5145861b02ce9531e86215d826f60970909c
Strangely, if I change the import to a require
the error is no longer thrown.
@marciocadev - Any idea what could be causing this? The only thing I can think of is there was an import change here: https://github.com/projen/projen/commit/e5cc5145861b02ce9531e86215d826f60970909c#diff-f937db55ea61185db729e05de728cb8d1c6f778873317aa2ae35945b24b812e2L10
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
nx test: Jest unit tests are failing to run in any test that ... - GitHub
Current Behavior An NX - Ionic and Vue workspace fails to run tests, many solutions tested and any seems to fix the issue:...
Read more >agdimech (agdimech) - PullAnswer
Bumping to Projen ^0.60.0 causes Jest Test failure for Python Projects. 0 Likes 6 Replies. © 2022 pullanswer.com - All rights reserved.
Read more >Projen NPM - npm.io
projen synthesizes project configuration files such as package.json ... Standard npm scripts like compile , build , test , package; eslint; Jest ......
Read more >Angular jest test bpmnModeler error - Modeler - Forum - bpmn.io
Hi, I use bpmn-js in Angular, Jest used by angular for testing code, and when testing the code, an error occurs with the...
Read more >projen: Versions - Openbase
release: publish to npm workflow fails when set project package manager to PNPM ... python project dependencies when running Jest Test (#2018) (cf51eaf), ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We can potentially create an e2e tests package which runs as part of CI and deploys the to be released version of projen to an in memory verdaccio. We can then synth projects for core types and verify everything works as it should?
I think to catch this error we have to make tests with imports from folder and from specific files
I can include more tests like this and I think all projects who extends from base languages projects need this kind of tests