Marketplace plugins: no Jest config at marketplace/ root; tests fail with syntax errors instead of running
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, nodejs, typescript
Research direction
Start with marketplace/package.json and the plugins/plivo test path, then run cd marketplace && npx jest plugins/plivo to reproduce the Babel syntax error. Add the marketplace-level Jest setup described in the issue and verify that TypeScript plugin tests run successfully instead of failing during parsing.
Written by the indexing model from the issue text.
Description
Problem
Hey, while adding tests for a new Plivo operation, I noticed that plugin tests can't currently be run.
marketplace/package.json includes ts-jest, but there's no jest.config.* at the marketplace/ root (or inside individual plugins). As a result, Jest falls back to its default Babel transform and fails on TypeScript syntax instead of running the tests.
cd marketplace
npx jest plugins/plivo
This results in a Babel parse error (SyntaxError: Unexpected token...).
Also, each plugin's package.json has:
"test": "echo \"Error: run tests from root\" && exit 1"
but there doesn't seem to be a working root-level test setup either, so plugin tests can't currently be run.
Suggested fix
Add a jest.config.cjs at the marketplace/ root (similar to the newer plugin system):
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: '.',
};
Since marketplace/package.json uses "type": "module", the config needs to be .cjs.
Context
Found this while adding tests for a new Plivo operation (PR #17020).
- Dominant language
- JavaScript
- Stars
- 40.9k
- Forks
- 5.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 202
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ToolJet/ToolJet
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
bug plugins
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·