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
+2 -1
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,6 +23,7 @@ const context = {}
const LOCALHOST = `http://localhost:${config.port}`
if (!config.noMongo) {
describe('Auth', () => {
before(async () => {
const app = new Server()
@@ -126,3 +126,4 @@ describe('Auth', () => {
})
})
})
}
+2
View File
@@ -19,6 +19,7 @@ let sandbox
// const mockContext = require('../../unit/mocks/ctx-mock').context
if (!config.noMongo) {
describe('Users', () => {
before(async () => {
// console.log(`config: ${JSON.stringify(config, null, 2)}`)
@@ -785,3 +786,4 @@ describe('Users', () => {
})
})
})
}
+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', () => {
}
})
})
}
})