fix: jest.setTimeout 300000

This commit is contained in:
chenos 2021-01-26 22:44:21 +08:00
parent db3a8a7499
commit 47bd72fa49
6 changed files with 6 additions and 5 deletions

View File

@ -1 +1,2 @@
jest.setTimeout(300000);
require('dotenv').config();

View File

@ -3,7 +3,7 @@ const path = require('path');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFiles: [path.resolve(__dirname, 'dotenv.js')],
setupFilesAfterEnv: [path.resolve(__dirname, 'dotenv.js')],
testMatch: [
// '**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)'

View File

@ -1,7 +1,7 @@
import { Agent, getAgent, getApp } from '..';
import { Application } from '@nocobase/server';
import { types } from '../../interfaces';
jest.setTimeout(30000);
describe('collection hooks', () => {
let app: Application;
let agent: Agent;

View File

@ -1,7 +1,7 @@
import { Agent, getAgent, getApp } from '../';
import { Application } from '@nocobase/server';
import * as types from '../../interfaces/types';
jest.setTimeout(30000);
describe('models.collection', () => {
let app: Application;
let agent: Agent;

View File

@ -1,8 +1,8 @@
import { Agent, getAgent, getApp } from '../';
import { Application } from '@nocobase/server';
import { options, types } from '../../interfaces';
jest.setTimeout(30000);
import { FieldModel } from '../../models';
describe('models.field', () => {
let app: Application;
let agent: Agent;

View File

@ -5,7 +5,7 @@ import { FILE_FIELD_NAME, STORAGE_TYPE_LOCAL } from '../constants';
import { getApp, getAgent, getAPI } from '.';
const DEFAULT_LOCAL_BASE_URL = process.env.LOCAL_STORAGE_BASE_URL || `http://localhost:${process.env.HTTP_PORT}/uploads`;
jest.setTimeout(30000);
describe('action', () => {
let app;
let agent;