Creates test request helper for API endpoints
Separates common utils into the medusa-core-utils package. Sets up a testing environment where mocked models/services/etc. can be placed in __mocks__ folder within its corresponding directory. The mocks will automatically be registered in a awilix container only used for testing.
This commit is contained in:
5
packages/medusa-core-utils/src/validator.js
Normal file
5
packages/medusa-core-utils/src/validator.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import Joi from "@hapi/joi"
|
||||
|
||||
Joi.objectId = require("joi-objectid")(Joi)
|
||||
|
||||
export default Joi
|
||||
Reference in New Issue
Block a user