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

No tests found when using fedtest with pnpm #406

Open
enisdenjo opened this issue Mar 24, 2023 · 2 comments
Open

No tests found when using fedtest with pnpm #406

enisdenjo opened this issue Mar 24, 2023 · 2 comments

Comments

@enisdenjo
Copy link
Contributor

Check this failing CI: https://github.com/dotansimha/graphql-yoga/actions/runs/4512947657/jobs/7947092913?pr=2525#step:10:917.

Same error occurs locally:

Run with `--passWithNoTests` to exit with code 0
In <wherever>/node_modules/.pnpm/@apollo+federation-subgraph-compatibility-tests@1.2.1_35dl3mosxfjzghpl26tn7o3fly/node_modules/@apollo/federation-subgraph-compatibility-tests
  93 files checked.
  testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 24 matches
  testPathIgnorePatterns:  - 0 matches
  testRegex:  - 0 matches
Pattern: <wherever>/node_modules/.pnpm/@apollo+federation-subgraph-compatibility-tests@1.2.1_35dl3mosxfjzghpl26tn7o3fly/node_modules/@apollo/federation-subgraph-compatibility-tests/dist/tests - 0 matches
 +6ms
compatibility tests encountered an error: SyntaxError: Unexpected end of JSON input +3ms

Repro steps:

  1. git clone git@github.com:dotansimha/graphql-yoga.git
  2. pnpm i
  3. pnpm build
  4. cd examples/nestjs-apollo-federation-compatibility
  5. pnpm build
  6. pnpm test (script for running fedtest)

I am out of ideas about what I can try to remedy this issue, honestly I don't even know why it happens.

Any help would be appreciated - thanks!

P.S. I am not using the GH action because there is already one for the graphql-yoga package and running multiple compatibility GH actions crates a race condition on the PR report comment.

@dariuszkuc
Copy link
Member

Hello 👋 It looks like a weird issue between pnpm and jest. Unsure when I will be able to look into this.

P.S. I am not using the GH action because there is already one for the graphql-yoga package and running multiple compatibility GH actions crates a race condition on the PR report comment.

FYI action will only attempt to comment on the PR if you provide it Github token -> don't specify it it on the other test and it won't be commenting :)

@enisdenjo
Copy link
Contributor Author

Cheers! The missing GH token helped and now the compat check works as expected, thank you!

We can leave this issue open just for future reference, but since I have got it working - it's not pressing at all.

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

2 participants