mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
first attempt to fix fialing api-v3 tests
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
import nconf from 'nconf';
|
||||
import { MongoClient as mongo } from 'mongodb';
|
||||
|
||||
const DB_URI = 'mongodb://localhost/habitrpg_test';
|
||||
|
||||
// Useful for checking things that have been deleted,
|
||||
// but you no longer have access to,
|
||||
// like private parties or users
|
||||
@@ -81,7 +79,7 @@ export async function getDocument (collectionName, doc) {
|
||||
|
||||
export function connectToMongo () {
|
||||
return new Promise((resolve, reject) => {
|
||||
mongo.connect(DB_URI, (err, db) => {
|
||||
mongo.connect(nconf.get('NODE_DB_URI'), (err, db) => {
|
||||
if (err) return reject(err);
|
||||
|
||||
resolve(db);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
import superagent from 'superagent';
|
||||
import nconf from 'nconf';
|
||||
import app from '../../../website/src/server';
|
||||
|
||||
const API_TEST_SERVER_PORT = 3003;
|
||||
const API_TEST_SERVER_PORT = nconf.get('PORT');
|
||||
let apiVersion;
|
||||
|
||||
// Sets up an abject that can make all REST requests
|
||||
|
||||
Reference in New Issue
Block a user