fix(controllers): Made Controllers library a class

This commit is contained in:
Chris Troutner
2021-07-25 16:49:01 -07:00
parent c46f7357c3
commit 44867f0173
3 changed files with 78 additions and 32 deletions
+6 -3
View File
@@ -7,14 +7,17 @@
const sinon = require('sinon')
const adapters = require('../../../src/adapters')
const { attachControllers } = require('../../../src/controllers')
// const { attachControllers } = require('../../../src/controllers')
const Controllers = require('../../../src/controllers')
describe('#Controllers', () => {
// let uut
let uut
let sandbox
beforeEach(() => {
sandbox = sinon.createSandbox()
uut = new Controllers()
})
afterEach(() => sandbox.restore())
@@ -31,7 +34,7 @@ describe('#Controllers', () => {
use: () => {}
}
await attachControllers(app)
await uut.attachControllers(app)
})
})
})