feat(tests): Increased unit test coverage

This commit is contained in:
Daniel Gonzalez
2025-06-27 20:11:27 -04:00
parent cf88fadfdc
commit 3d911d1062
14 changed files with 265 additions and 15 deletions
+15
View File
@@ -37,6 +37,21 @@ describe('#adapters', () => {
assert.equal(result, true)
})
it('should not start ipfs on test enviroment', async () => {
// Mock dependencies
uut.config.getJwtAtStartup = true
uut.config.useIpfs = true
uut.config.env = 'test'
sandbox.stub(uut.fullStackJwt, 'getJWT').resolves()
sandbox.stub(uut.fullStackJwt, 'instanceBchjs').resolves()
const ipfsSpy = sandbox.stub(uut.ipfs, 'start').resolves(null)
const result = await uut.start()
assert.isTrue(ipfsSpy.notCalled)
assert.equal(result, true)
})
it('should catch and throw an error', async () => {
try {