Convert models directory to TypeScript#1373
Conversation
Co-authored-by: alexanmtz <88840+alexanmtz@users.noreply.github.com>
Co-authored-by: alexanmtz <88840+alexanmtz@users.noreply.github.com>
alexanmtz
left a comment
There was a problem hiding this comment.
Many tests are failing
-
Task Solution
Create task Solution
should create a task solution with an existing assign:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at OrderFactory (test/factories/orderFactory.ts:15:17)
at Context. (test/api/task-solution/taskSolution.test.ts:132:9) -
Task Solution
Create task Solution
should create a task solution with stripe response with insufficient capatibilities:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at OrderFactory (test/factories/orderFactory.ts:15:17)
at Context. (test/api/task-solution/taskSolution.test.ts:219:9) -
Task Solution
Create task Solution
should update a task solution:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at OrderFactory (test/factories/orderFactory.ts:15:17)
at Context. (test/api/task-solution/taskSolution.test.ts:288:9) -
DELETE /tasks/delete/:id
should delete a task by id:
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/circleci/repo/test/api/task/task-delete.test.ts)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) -
DELETE /tasks/delete/:id
should only delete own task:
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/circleci/repo/test/api/task/task-delete.test.ts)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) -
DELETE /tasks/delete/:id
should not delete task of another user:
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/circleci/repo/test/api/task/task-delete.test.ts)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) -
DELETE /tasks/delete/:id
should return error when deleting task with orders:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at OrderFactory (test/factories/orderFactory.ts:15:17)
at Context. (test/api/task/task-delete.test.ts:74:19) -
Current User Info
should fetch initial user info by userId:
Error: expected 200 "OK", got 500 "Internal Server Error"
at Context. (test/api/user/userInfo.test.ts:22:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
Current User Info
should fetch user info after creating tasks and payments:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.bulkInsert (node_modules/sequelize/src/dialects/abstract/query-interface.js:881:21)
at recursiveBulkCreate (node_modules/sequelize/src/model.js:2851:25)
at Function.bulkCreate (node_modules/sequelize/src/model.js:2977:12)
at Context. (test/api/user/userInfo.test.ts:42:5) -
Crons
Order
should update order status when payment expired on Paypal:
TypeError: Cannot read properties of undefined (reading 'source_id')
at Context. (test/cron.test.ts:47:47)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Crons
Order
should update order status when payment authorization expired after one month on Paypal:
TypeError: Cannot read properties of undefined (reading 'source_id')
at Context. (test/cron.test.ts:74:47)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Orders
should transfer a Stripe order:
column "taskId" of relation "Orders" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Context. (test/order.test.ts:918:19) -
Orders
create Order
should create a new order:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:82:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
Orders
create Order
should not call notifyNewBounty when order is created for a task with not_listed set to true:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at orderBuilds (src/modules/orders/orderBuilds.ts:33:17)
at Context. (test/order.test.ts:106:9) -
Orders
create Order
should not call notifyNewBounty when order is created for a task with private set to true:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at orderBuilds (src/modules/orders/orderBuilds.ts:33:17)
at Context. (test/order.test.ts:136:9) -
Orders
create Order
should not call notifyNewBounty when order is created (notification only on payment completion):
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at orderBuilds (src/modules/orders/orderBuilds.ts:33:17)
at Context. (test/order.test.ts:167:9) -
Orders
create Order
should call notifyNewBounty when wallet payment completes for a public task:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.select (node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
at Function.findAll (node_modules/sequelize/src/model.js:1824:21)
at Wallet.spendBalance (src/models/wallet.ts:123:20)
at Wallet.totalBalance (src/models/wallet.ts:141:31)
at updateWalletBalance (src/models/wallet.ts:84:28)
at Function.afterFind (src/models/wallet.ts:75:15)
at Function.runHooks (node_modules/sequelize/src/hooks.js:131:7)
at Function.findAll (node_modules/sequelize/src/model.js:1826:7)
at Function.findOne (node_modules/sequelize/src/model.js:1998:12)
at Wallet.reload (node_modules/sequelize/src/model.js:4264:22)
at Context. (test/order.test.ts:207:9) -
Orders
create Order
should not call notifyNewBounty when wallet payment completes for a private task:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.select (node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
at Function.findAll (node_modules/sequelize/src/model.js:1824:21)
at Wallet.spendBalance (src/models/wallet.ts:123:20)
at Wallet.totalBalance (src/models/wallet.ts:141:31)
at updateWalletBalance (src/models/wallet.ts:84:28)
at Function.afterFind (src/models/wallet.ts:75:15)
at Function.runHooks (node_modules/sequelize/src/hooks.js:131:7)
at Function.findAll (node_modules/sequelize/src/model.js:1826:7)
at Function.findOne (node_modules/sequelize/src/model.js:1998:12)
at Wallet.reload (node_modules/sequelize/src/model.js:4264:22)
at Context. (test/order.test.ts:262:9) -
Orders
create Order
should create a order type invoice-item and create customer if theres no customer associated:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:411:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
should create a order type invoice-item with a existing customer:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:459:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
should create a order type wallet funds:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:554:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
should create a order type wallet funds with enough balance:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:597:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
should create a new paypal order:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:651:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
should cancel a paypal order:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:705:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
should fetch a paypal order with details:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:770:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
Orders
create Order
should authorize a paypal order:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Context. (test/order.test.ts:794:21) -
Orders
create Order
should update a paypal order:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Context. (test/order.test.ts:836:21) -
Orders
create Order
should get order details simple:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Context. (test/order.test.ts:855:21) -
Orders
create Order
should get order invoice:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Context. (test/order.test.ts:879:21) -
Orders
create Order
Order with Plan
should create a new order with a plan:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:303:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Orders
create Order
Order with Plan
should create a new order with no exact amount with a plan:
Error: expected 200 "OK", got 401 "Unauthorized"
at Context. (test/order.test.ts:332:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
Orders
PayPal payment notifications
should call notifyNewBounty when PayPal payment completes for a public task:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at OrderFactory (test/factories/orderFactory.ts:15:17)
at Context. (test/order.test.ts:983:23) -
Orders
PayPal payment notifications
should not call notifyNewBounty when PayPal payment completes for a private task:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at OrderFactory (test/factories/orderFactory.ts:15:17)
at Context. (test/order.test.ts:1060:23) -
Queries - Issue - Bounty - findUnclaimedBounties
should return unclaimed bounties:
column Orders.taskId does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.select (node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
at Function.findAll (node_modules/sequelize/src/model.js:1824:21)
at findUnclaimedBounties (src/queries/issue/bounty/findUnclaimedBounties.ts:8:17)
at Context. (test/queries/issue/bounty/findUnclaimedBounties.test.ts:49:31) -
Scripts
Scripts
Check for total Gitpay Balance:
AssertionError: expected 0 to deeply equal { Object (payments_fee, payouts) }
at Assertion.assertEqual (node_modules/chai/lib/chai/core/assertions.js:485:19)
at ctx. [as equal] (node_modules/chai/lib/chai/utils/addMethod.js:41:25)
at Context. (test/scripts.test.ts:59:39)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
tasks
Task crud
should not raise an error on fetch if the issue build responds with limit exceeded:
AssertionError: expected undefined to equal 1
at Context. (test/task.test.ts:212:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
tasks
Task crud
should update status to closed when is paid:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at HasMany.create (node_modules/sequelize/src/associations/has-many.js:483:12)
at Context. (test/task.test.ts:707:21) -
tasks
Task crud
task fetch
should fetch task:
TypeError: Cannot read properties of undefined (reading 'id')
at Context. (test/task.test.ts:376:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
tasks
Task crud
task fetch
should fetch task and not sync status in_progress on Gitpay and open on Github:
TypeError: Cannot read properties of undefined (reading 'id')
at Context. (test/task.test.ts:417:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
tasks
Task crud
task fetch
should fetch task and sync status in_progress on Gitpay and closed on Github:
TypeError: Cannot read properties of undefined (reading 'id')
at Context. (test/task.test.ts:452:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should not create transfer with no orders:
AssertionError: expected undefined to equal 'No orders found'
at Context. (test/transfer.test.ts:52:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should not create a transfer with no user assigned:
AssertionError: expected undefined to equal 'No user assigned'
at Context. (test/transfer.test.ts:64:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should not create transfer with no paid order:
AssertionError: expected undefined to equal 'All orders must be paid'
at Context. (test/transfer.test.ts:78:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should create transfer with a single order paid with stripe:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:98:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should create transfer with two orders paid with stripe:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:128:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should create transfer with three multiple orders paid with stripe:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:164:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should create transfer with three multiple orders paid with stripe and paypal but paypal not paid:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:199:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should create transfer with three mulltiple orders paid with stripe and paypal with two orders paid in multiple methods:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:265:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should update transfer pending to created for a pending transfer for an activated account:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:296:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should update transfer pending to created for a pending transfer for an activated account with multiple payments:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:374:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should update transfer pending to created and update value for a pending transfer for an activated account for multiple payments:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:440:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should fetch transfer with a paypal associated payout:
AssertionError: expected undefined to equal 'in_transit'
at Context. (test/transfer.test.ts:560:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should not create transfers with same id:
AssertionError: expected undefined to equal 'This transfer already exists'
at Context. (test/transfer.test.ts:590:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Transfer
Initial transfer with one credit card and account activated
should not create transfers with same taskId:
AssertionError: expected undefined to equal 'Only one transfer for an issue'
at Context. (test/transfer.test.ts:609:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) -
Wallet
should list wallets:
Error: expected 200 "OK", got 400 "Bad Request"
at Context. (test/wallet.test.ts:66:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- Wallet
should fetch wallet:
Error: expected 200 "OK", got 400 "Bad Request"
at Context. (test/wallet.test.ts:84:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- WalletOrder
creating wallet order
should create an initial wallet Order:
Error: expected 201 "Created", got 400 "Bad Request"
at Context. (test/walletOrder.test.ts:51:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
WalletOrder
updating wallet order
should update an initial wallet Order with balance updated when order is paid:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.select (node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
at Function.findAll (node_modules/sequelize/src/model.js:1824:21)
at Wallet.spendBalance (src/models/wallet.ts:123:20)
at Wallet.totalBalance (src/models/wallet.ts:141:31)
at updateWalletBalance (src/models/wallet.ts:84:28)
at Function.afterFind (src/models/wallet.ts:75:15)
at Function.runHooks (node_modules/sequelize/src/hooks.js:131:7)
at Function.findAll (node_modules/sequelize/src/model.js:1826:7)
at Function.findOne (node_modules/sequelize/src/model.js:1998:12)
at Context. (test/walletOrder.test.ts:118:29) -
WalletOrder
updating wallet order
should create many wallet Orders with balance updated when order is succeeded:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.select (node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
at Function.findAll (node_modules/sequelize/src/model.js:1824:21)
at Wallet.spendBalance (src/models/wallet.ts:123:20)
at Wallet.totalBalance (src/models/wallet.ts:141:31)
at updateWalletBalance (src/models/wallet.ts:84:28)
at Function.afterFind (src/models/wallet.ts:75:15)
at Function.runHooks (node_modules/sequelize/src/hooks.js:131:7)
at Function.findAll (node_modules/sequelize/src/model.js:1826:7)
at Function.findOne (node_modules/sequelize/src/model.js:1998:12)
at Context. (test/walletOrder.test.ts:176:29) -
WalletOrder
updating wallet order
should update wallet order:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.select (node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)
at Function.findAll (node_modules/sequelize/src/model.js:1824:21)
at Wallet.spendBalance (src/models/wallet.ts:123:20)
at Wallet.totalBalance (src/models/wallet.ts:141:31)
at updateWalletBalance (src/models/wallet.ts:84:28)
at Function.afterFind (src/models/wallet.ts:75:15)
at Function.runHooks (node_modules/sequelize/src/hooks.js:131:7)
at Function.findAll (node_modules/sequelize/src/model.js:1826:7)
at Function.findOne (node_modules/sequelize/src/model.js:1998:12)
at Context. (test/walletOrder.test.ts:209:29) -
WalletOrder
list wallet orders
should list wallet orders:
Error: expected 200 "OK", got 400 "Bad Request"
at Context. (test/walletOrder.test.ts:237:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
webhooks for platform
webhooks for charge
should update balance after a refund is triggered:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at HasMany.create (node_modules/sequelize/src/associations/has-many.js:483:12)
at Context. (test/webhook.platform.test.ts:89:21) -
webhooks for platform
webhooks for charge
should update the order when a webhook charge.succeeded is triggered:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at HasMany.create (node_modules/sequelize/src/associations/has-many.js:483:12)
at Context. (test/webhook.platform.test.ts:121:21) -
webhooks for platform
webhooks for charge
should create the order when a webhook charge.succeeded is triggered and the order does not exist:
Error: expected "Content-Type" matching /json/, got "text/html; charset=utf-8"
at Context. (test/webhook.platform.test.ts:155:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertHeader (node_modules/supertest/lib/test.js:247:16)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
-
webhooks for platform
webhooks for charge
should update the order when a webhook charge.failed is triggered:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at HasMany.create (node_modules/sequelize/src/associations/has-many.js:483:12)
at Context. (test/webhook.platform.test.ts:174:21) -
webhooks for platform
webhooks for invoice
should notify the user when the invoice is created:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at HasMany.create (node_modules/sequelize/src/associations/has-many.js:483:12)
at Context. (test/webhook.platform.test.ts:342:21) -
webhooks for platform
webhooks for invoice
should notify the user when the invoice is updated:
column "taskId" does not exist
Error
at Query.run (node_modules/sequelize/src/dialects/postgres/query.js:76:25)
at (node_modules/sequelize/src/sequelize.js:650:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at PostgresQueryInterface.insert (node_modules/sequelize/src/dialects/abstract/query-interface.js:795:21)
at Order.save (node_modules/sequelize/src/model.js:4154:35)
at Function.create (node_modules/sequelize/src/model.js:2305:12)
at HasMany.create (node_modules/sequelize/src/associations/has-many.js:483:12)
at Context. (test/webhook.platform.test.ts:379:21) -
webhooks for platform
webhooks for Wallet order
should create a new wallet order when a webhook invoice.create is triggered:
Error: expected 200 "OK", got 400 "Bad Request"
at Context. (test/webhook.platform.test.ts:499:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
- webhooks for platform
webhooks for Wallet order
should create a new wallet order when a webhook invoice.updated is triggered:
Error: expected 200 "OK", got 400 "Bad Request"
at Context. (test/webhook.platform.test.ts:525:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Test._assertStatus (node_modules/supertest/lib/test.js:267:14)
at /home/circleci/repo/node_modules/supertest/lib/test.js:323:13
at Test._assertFunction (node_modules/supertest/lib/test.js:300:13)
at Test.assert (node_modules/supertest/lib/test.js:179:23)
at Server.localAssert (node_modules/supertest/lib/test.js:135:14)
at Object.onceWrapper (node:events:631:28)
at Server.emit (node:events:517:28)
at emitCloseNT (node:net:2221:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
Exited with code exit status 70
Please run the tests and make sure they pass before finishing
… added foreign keys Foreign key columns should only be defined in model schema when they were explicitly defined in the original JS models. Many models had foreign keys only in associations, not in the schema definition. Co-authored-by: alexanmtz <88840+alexanmtz@users.noreply.github.com>
Fixed in commit 06882c9. The issue was that I incorrectly added foreign key column definitions (like |
Description
Converted 24 JavaScript models to TypeScript following the established pattern in
paymentRequestBalance.ts. All models now have proper type definitions, interfaces, and class-based structure while maintaining full backward compatibility.Changes
Models converted: assign, coupon, history, label, member, offer, order, organization, paymentRequest, paymentRequestTransfer, payout, plan, planSchema, programminglanguage, project, projectProgrammingLanguage, role, task, taskSolution, transfer, type, user, wallet, walletOrder
Type pattern applied:
Preserved: All hooks, associations, instance methods, and business logic unchanged
Foreign key handling: Foreign key columns are only included in model schemas when they were explicitly defined in the original JavaScript models. Columns managed solely through associations (via
belongsTo,hasMany, etc.) are not duplicated in the schema definition, following Sequelize best practices.Dependencies: Added
@types/bcryptfor type supportBug Fixes
Fixed foreign key column definitions that were incorrectly added during initial conversion:
This ensures Sequelize doesn't attempt to create duplicate columns, which was causing "column does not exist" errors in tests.
Testing
Thank you for your contribution!
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.