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

Fix tests #22

Merged
merged 13 commits into from
Jan 19, 2024
Merged

Fix tests #22

merged 13 commits into from
Jan 19, 2024

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented Jan 19, 2024

Fixing lint issues will be a separate PR as it's a large diff.

@codetheweb codetheweb marked this pull request as ready for review January 19, 2024 00:37
@codetheweb codetheweb requested a review from mxsdev January 19, 2024 00:37
Copy link
Contributor

@mxsdev mxsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are so many tests deleted?

@codetheweb
Copy link
Contributor Author

they were either not passing or throwing type errors and are dead code afaik

@mxsdev
Copy link
Contributor

mxsdev commented Jan 19, 2024

I get the following error when trying to run locally @codetheweb (I reinstalled node-modules and made sure to run build, even though its part of pretest now):

Error [ERR_WORKER_INVALID_EXEC_ARGV]: Initiated Worker with invalid execArgv flags: --import=tsx

  Error [ERR_WORKER_INVALID_EXEC_ARGV]: Initiated Worker with invalid execArgv flags: --import=tsx
      at new NodeError (node:internal/errors:387:5)
      at new Worker (node:internal/worker:195:13)
      at createWorker (file:///Users/mxsdev/Projects/edgespec/node_modules/ava/lib/fork.js:23:12)
      at loadFork (file:///Users/mxsdev/Projects/edgespec/node_modules/ava/lib/fork.js:79:39)
      at pMap.concurrency.concurrency (file:///Users/mxsdev/Projects/edgespec/node_modules/ava/lib/api.js:285:20)
      at file:///Users/mxsdev/Projects/edgespec/node_modules/p-map/index.js:139:26

@mxsdev
Copy link
Contributor

mxsdev commented Jan 19, 2024

they were either not passing or throwing type errors and are dead code afaik

I don't think they're dead code? Everything under endpoints is there to test the routespec config, and the module test is there to test module services.

They were passing by the time I had my PRs, I thought..

@codetheweb
Copy link
Contributor Author

I get the following error when trying to run locally @codetheweb (I reinstalled node-modules and made sure to run build, even though its part of pretest now):

hmm what node version? there's a minor range in v20 that may not work, can update engines

@mxsdev
Copy link
Contributor

mxsdev commented Jan 19, 2024

hmm what node version? there's a minor range in v20 that may not work, can update engines

Ah, i was on node 16. Using node 18 worked. we should include an .nvmrc file to enforce he right node version

@codetheweb
Copy link
Contributor Author

I don't think they're dead code? Everything under endpoints is there to test the routespec config, and the module test is there to test module services.

sorry, should have expanded on this a little

I think Seve added src/lib/ModuleService.ts when init'ing the repo, but I'm not sure how it would be used at this point--adapters serve a similar purpose.

tests/endpoints/**: yes, relevant I think, my bad

@codetheweb codetheweb requested a review from mxsdev January 19, 2024 01:39
Copy link
Contributor

@mxsdev mxsdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Seve added src/lib/ModuleService.ts when init'ing the repo, but I'm not sure how it would be used at this point--adapters serve a similar purpose.

Ah, so you're thinking of like:

type ModuleServiceAdapter = (edgeSpec: EdgeSpec) => (request: EdgeSpecRequest, routeParam?: string) => Promise<Response>

Yep, makes sense 👍

I'll re-introduce module service adapters in a future PR I think.

@codetheweb codetheweb merged commit 61ba842 into main Jan 19, 2024
7 of 9 checks passed
@codetheweb codetheweb deleted the fix-tests branch January 19, 2024 18:41
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

Successfully merging this pull request may close these issues.

2 participants