321-PoM / findmy

Android app with Google Maps API integration for saving POIs (points of interest) around school campus and sharing POIs with friends
0 stars 1 forks source link

Need to update Jest functions. #213

Open junsu-a opened 1 year ago

junsu-a commented 1 year ago

Jest functions are not following our model schema, or api spec.

e.g.

      PrismaClientKnownRequestError: 
      Invalid `prisma.User.findUnique()` invocation in
      /home/runner/work/findmy/findmy/backend/services/friendService.js:41:36

        38 };
        39 
        40 export const createFriendship = async (userIdFrom, userIdTo) => {
      → 41     const from = await prisma.User.findUnique(
      The column `findmy_test.User.mapBuxUpdate` does not exist in the current database.
          at Cn.handleRequestError (/home/runner/work/findmy/findmy/backend/node_modules/@prisma/client/runtime/library.js:123:6817)
          at Cn.handleAndLogRequestError (/home/runner/work/findmy/findmy/backend/node_modules/@prisma/client/runtime/library.js:123:6206)
          at Cn.request (/home/runner/work/findmy/findmy/backend/node_modules/@prisma/client/runtime/library.js:123:5926)
          at l (/home/runner/work/findmy/findmy/backend/node_modules/@prisma/client/runtime/library.js:128:9968)
          at Module.createFriendship (/home/runner/work/findmy/findmy/backend/services/friendService.js:41:18)
          at createFriendship (/home/runner/work/findmy/findmy/backend/controllers/friendController.js:48:24) {
        code: 'P2022',
        clientVersion: '5.5.2',
        meta: { column: 'findmy_test.User.mapBuxUpdate' }
      }

And any others...