feathers icon indicating copy to clipboard operation
feathers copied to clipboard

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

Open FossPrime opened this issue 2 years ago • 1 comments

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

FossPrime avatar Sep 27 '23 03:09 FossPrime

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!

daffl avatar Oct 04 '23 17:10 daffl