chore(node): upgrade to Node 20
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import apiError from '../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../website/server/libs/apiError';
|
||||
|
||||
describe('API Messages', () => {
|
||||
const message = 'Only public guilds support pagination.';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { model as User } from '../../../../../../website/server/models/user';
|
||||
import amzLib from '../../../../../../website/server/libs/payments/amazon';
|
||||
import payments from '../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../website/common';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
import * as gems from '../../../../../../website/server/libs/payments/gems';
|
||||
|
||||
const { i18n } = common;
|
||||
|
||||
@@ -4,7 +4,7 @@ import nconf from 'nconf';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
import { model as User } from '../../../../../../website/server/models/user';
|
||||
import common from '../../../../../../website/common';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
import * as gems from '../../../../../../website/server/libs/payments/gems';
|
||||
|
||||
const BASE_URL = nconf.get('BASE_URL');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
import common from '../../../../../../website/common';
|
||||
import {
|
||||
getOneTimePaymentInfo,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '../../../helpers/api-unit.helper';
|
||||
import { ensurePermission } from '../../../../website/server/middlewares/ensureAccessRight';
|
||||
import { NotAuthorized } from '../../../../website/server/libs/errors';
|
||||
import apiError from '../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../website/server/libs/apiError';
|
||||
|
||||
describe('ensure access middlewares', () => {
|
||||
let res; let req; let
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
generateNext,
|
||||
} from '../../../helpers/api-unit.helper';
|
||||
import { Forbidden } from '../../../../website/server/libs/errors';
|
||||
import apiError from '../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../website/server/libs/apiError';
|
||||
|
||||
function checkErrorThrown (next) {
|
||||
expect(next).to.have.been.calledOnce;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
generateNext,
|
||||
} from '../../../helpers/api-unit.helper';
|
||||
import { TooManyRequests } from '../../../../website/server/libs/errors';
|
||||
import apiError from '../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../website/server/libs/apiError';
|
||||
import logger from '../../../../website/server/libs/logger';
|
||||
|
||||
describe('rateLimiter middleware', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { v4 as generateUUID } from 'uuid';
|
||||
import { model as Webhook } from '../../../../website/server/models/webhook';
|
||||
import { BadRequest } from '../../../../website/server/libs/errors';
|
||||
import apiError from '../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../website/server/libs/apiError';
|
||||
|
||||
describe('Webhook Model', () => {
|
||||
context('Instance Methods', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
generateUser,
|
||||
resetHabiticaDB,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('GET /coupons/', () => {
|
||||
let user;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
translate as t,
|
||||
resetHabiticaDB,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /coupons/generate/:event', () => {
|
||||
let user;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
generateGroup,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('GET /heroes/party/:groupId', () => {
|
||||
let user; // admin user
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import {
|
||||
generateUser,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('payments : paypal #checkoutSuccess', () => {
|
||||
const endpoint = '/paypal/checkout/success';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
import shared from '../../../../../../website/common';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('payments : paypal #subscribe', () => {
|
||||
const endpoint = '/paypal/subscribe';
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
generateUser,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
|
||||
describe('payments : paypal #subscribeSuccess', () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import { quests as questScrolls } from '../../../../../website/common/script/content/quests';
|
||||
import { chatModel as Chat } from '../../../../../website/server/models/message';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /groups/:groupId/quests/invite/:questKey', () => {
|
||||
let questingGroup;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { v4 as generateUUID } from 'uuid';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
import {
|
||||
generateUser,
|
||||
sleep,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
generateChallenge,
|
||||
sleep,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /user/class/cast/:spellId', () => {
|
||||
let user;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import shared from '../../../../../../website/common/script';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
const { content } = shared;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {
|
||||
generateUser,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /user/buy-gear/:key', () => {
|
||||
let user;
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import shared from '../../../../../../website/common/script';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
const { content } = shared;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import shared from '../../../../../../website/common/script';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
const { content } = shared;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /user/allocate', () => {
|
||||
let user;
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /user/webhook', () => {
|
||||
let user; let
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import apiError from '../../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../../website/server/libs/apiError';
|
||||
|
||||
describe('PUT /user/webhook/:id', () => {
|
||||
let user; let
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
generateChallenge,
|
||||
sleep,
|
||||
} from '../../../helpers/api-integration/v4';
|
||||
import apiError from '../../../../website/server/libs/apiError';
|
||||
import { apiError } from '../../../../website/server/libs/apiError';
|
||||
|
||||
describe('POST /user/class/cast/:spellId', () => {
|
||||
let user;
|
||||
|
||||
Reference in New Issue
Block a user