Merge pull request #155 from Permissionless-Software-Foundation/ct-unstable

fix(Mongo): Skipping some tests when noMongo is true
This commit is contained in:
Chris Troutner
2024-06-09 09:12:31 -07:00
committed by GitHub
3 changed files with 833 additions and 826 deletions
+4 -3
View File
@@ -13,7 +13,6 @@ import axios from 'axios'
// Local support libraries
import config from '../../../config/index.js'
import Server from '../../../bin/server.js'
import testUtils from '../../utils/test-utils.js'
import AdminLib from '../../../src/adapters/admin.js'
@@ -24,7 +23,8 @@ const context = {}
const LOCALHOST = `http://localhost:${config.port}`
describe('Auth', () => {
if (!config.noMongo) {
describe('Auth', () => {
before(async () => {
const app = new Server()
@@ -125,4 +125,5 @@ describe('Auth', () => {
}
})
})
})
})
}
+4 -2
View File
@@ -19,7 +19,8 @@ let sandbox
// const mockContext = require('../../unit/mocks/ctx-mock').context
describe('Users', () => {
if (!config.noMongo) {
describe('Users', () => {
before(async () => {
// console.log(`config: ${JSON.stringify(config, null, 2)}`)
@@ -784,4 +785,5 @@ describe('Users', () => {
assert.equal(result.data.success, true)
})
})
})
})
}
+4
View File
@@ -2,6 +2,8 @@ import { assert } from 'chai'
import Admin from '../../../src/adapters/admin.js'
import sinon from 'sinon'
import util from 'util'
import config from '../../../config/index.js'
util.inspect.defaultOptions = { depth: 1 }
let sandbox
@@ -15,6 +17,7 @@ describe('Admin', () => {
afterEach(() => sandbox.restore())
if (!config.noMongo) {
describe('loginAdmin()', () => {
it('should logind admin', async () => {
try {
@@ -112,4 +115,5 @@ describe('Admin', () => {
}
})
})
}
})