seamapi / edgespec

☃️ an API framework for everywhere.
MIT License
5 stars 2 forks source link

Fix tests #22

Closed codetheweb closed 9 months ago

codetheweb commented 9 months ago

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

codetheweb commented 9 months ago

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

mxsdev commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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