Skip to content

Commit

Permalink
chore: revert documentData changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ijemmao committed Feb 16, 2023
1 parent 77db35b commit 1ffe773
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Expand Up @@ -19,15 +19,18 @@
"cypress"
],
"rules": {
"function-call-argument-newline": ["off"],
"function-paren-newline": ["off"],
"import/prefer-default-export": ["off"],
"max-len": ["error", { "code": 120 }],
"newline-per-chained-call": ["off"],
"no-console": ["off"],
"no-nested-ternary": ["off"],
"no-promise-executor-return": ["off"],
"no-underscore-dangle": ["off"],
"semi": ["error", "always"],
"react/jsx-filename-extension": ["off"],
"react/function-component-definition": ["off"],
"react/jsx-props-no-spreading": ["off"],
"react/no-danger": ["off"],
"@next/next/no-html-link-for-pages": ["off"],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 7
timeout-minutes: 10

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Expand Up @@ -20,4 +20,4 @@ jobs:
run: yarn install

- name: Run ESLint
run: yarn run eslint ./src --ext .js,.jsx,.ts,.tsx
run: yarn run eslint ./src --ext .js,.jsx,.ts,.tsx -c ./.eslintrc.json
8 changes: 6 additions & 2 deletions __tests__/__mocks__/documentData.js
@@ -1,5 +1,9 @@
const wordId = '5f864d7401203866b6546dd3';
const exampleId = '5f864d7401203866b6546dd3';
import mongoose from 'mongoose';

const { ObjectId } = mongoose.Types;

const wordId = new ObjectId('5f864d7401203866b6546dd3');
const exampleId = new ObjectId('5f864d7401203866b6546dd3');
const developerData = {
name: 'Developer',
email: 'developer@example.com',
Expand Down
3 changes: 2 additions & 1 deletion src/services/database.js
@@ -1,5 +1,5 @@
import mongoose from 'mongoose';
import { MONGO_URI, isProduction } from '../config';
import { MONGO_URI, isProduction, isTest } from '../config';

const DISCONNECTED = 0;

Expand All @@ -10,6 +10,7 @@ export const createDbConnection = () => {
useNewUrlParser: true,
useUnifiedTopology: true,
autoIndex: true,
readPreference: isTest ? 'primary' : 'nearest',
});

console.log('Attempting MongoDB URI:', MONGO_URI);
Expand Down

0 comments on commit 1ffe773

Please sign in to comment.