Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Freezystem committed Aug 27, 2024
1 parent 315779f commit 03b7f10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/moleculer-db/test/unit/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ describe("Test transformDocuments method", () => {
expect(res).toBe(doc);

expect(mockAdapter.entityToObject).toHaveBeenCalledTimes(1);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(doc, ctx);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(doc, ctx, ctx.params);

expect(service.encodeID).toHaveBeenCalledTimes(1);
expect(service.encodeID).toHaveBeenCalledWith(doc._id);
Expand All @@ -566,7 +566,7 @@ describe("Test transformDocuments method", () => {
expect(res).toBe(doc);

expect(mockAdapter.entityToObject).toHaveBeenCalledTimes(1);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(doc, ctx);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(doc, ctx, ctx.params);

expect(service.encodeID).toHaveBeenCalledTimes(1);
expect(service.encodeID).toHaveBeenCalledWith(doc._id);
Expand Down Expand Up @@ -603,8 +603,8 @@ describe("Test transformDocuments method", () => {
expect(res).toEqual(docs);

expect(mockAdapter.entityToObject).toHaveBeenCalledTimes(2);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(docs[0], ctx);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(docs[1], ctx);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(docs[0], ctx, ctx.params);
expect(mockAdapter.entityToObject).toHaveBeenCalledWith(docs[1], ctx, ctx.params);

expect(service.encodeID).toHaveBeenCalledTimes(2);
expect(service.encodeID).toHaveBeenCalledWith(docs[0]._id);
Expand Down

0 comments on commit 03b7f10

Please sign in to comment.