feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.97k stars 744 forks source link

adapter.Model lacks test coverage. Feathers-memory lacks support. #3283

Open FossPrime opened 9 months ago

FossPrime commented 9 months ago

Steps to reproduce

Attempt to swap the Adapter.Model on a feathers-memory service.

Expected behavior

Swaps should happen, like they do on MongoDB and Knex adapters. The feature should be tested somewhere near here: https://github.com/feathersjs/feathers/blob/dove/packages/adapter-tests/src/syntax.ts#L306C39-L306C39

Actual behavior

  1. params.adapter.Model is completely ignored in feathers-memory
  2. No testing done, causing spotty support in third party adapters like feathers-lowdb

Reproduction

https://stackblitz.com/edit/feathersjs-v5-memory-model?file=test%2Fapp.test.ts%3AL106-L106

daffl commented 9 months ago

Good point. I believe to make this work, adapter.store should become adapter.Model and yes, we'd definitely want to test this in the common test suite. We also started a new project that'll hopefully let us use those adapters anywhere, not just with Feathers. More on that soon!