Marketplace plugins: no Jest config at marketplace/ root; tests fail with syntax errors instead of running
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40.9k
- Forks
- 5.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 202
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).
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.
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.
Assessment
- Tech stack
- javascript, nodejs, typescript
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100