Skip to content

Commit

Permalink
Fix issues caused by updating @hapi/hapi
Browse files Browse the repository at this point in the history
The upgrade from version 18->19 introduces a breaking change "No joi schema compiler is loaded by default and must be explicitly loaded". This commit fixes that issue as per the v19 release notes: hapijs/hapi#4017
  • Loading branch information
Jozzey committed Jun 8, 2023
1 parent 16a5713 commit de5c6ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const start = async function () {
try {
await server.register(plugins)
await server.register(HapiPinoPlugin())
server.validator(require('@hapi/joi'))
configureServerAuthStrategy(server)
server.route(routes)

Expand Down
3 changes: 2 additions & 1 deletion test/modules/nald-import/nald.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ let licenceData

experiment('Test NALD import', () => {
before(async () => {
await server.route(routes)
server.validator(require('@hapi/joi'))
server.route(routes)

// Generate dummy NALD data
await licenceCreator()
Expand Down

0 comments on commit de5c6ce

Please sign in to comment.