Files
ipfs-bch-wallet-service/test/unit/controllers/controllers.unit.js
T

38 lines
782 B
JavaScript
Raw Normal View History

2021-07-11 21:59:18 -07:00
/*
Unit tests for controllers index.js file.
*/
// Public npm libraries
// const assert = require('chai').assert
const sinon = require('sinon')
const adapters = require('../../../src/adapters')
const { attachControllers } = require('../../../src/controllers')
describe('#Controllers', () => {
// let uut
let sandbox
beforeEach(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => sandbox.restore())
describe('#attachControllers', () => {
it('should attach the controllers', async () => {
// mock IPFS
sandbox.stub(adapters.ipfs, 'start').resolves({})
adapters.ipfs.ipfsCoordAdapter = {
attachRPCRouter: () => {}
}
const app = {
use: () => {}
}
await attachControllers(app)
})
})
})