Skip to content

Commit

Permalink
refactor(test): reorganize test directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed May 31, 2023
1 parent 3bb0972 commit 692f912
Show file tree
Hide file tree
Showing 10 changed files with 1,204 additions and 6,074 deletions.
9 changes: 5 additions & 4 deletions test/api/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
import { testApiHandler } from 'next-test-api-route-handler';
import { getProperty as dotPath } from 'dot-prop';
import { toss } from 'toss-expression';

import { GuruMeditationError } from 'universe/error';
import { mockEnvFactory } from 'testverse/setup';
import { setupMemoryServerOverride } from 'multiverse/mongo-test';
import { getFixtures } from 'testverse/fixtures/integration';
import { BANNED_BEARER_TOKEN, DUMMY_BEARER_TOKEN } from 'multiverse/next-auth';
import { api } from 'testverse/fixtures';
import { getDb } from 'multiverse/mongo-schema';
import { api } from 'testverse/util';
import { getFixtures } from 'testverse/integration';
import { mockEnvFactory } from 'testverse/setup';

import type { TestResultset, TestResult } from 'testverse/fixtures/integration';
import type { TestResultset, TestResult } from 'testverse/integration';

setupMemoryServerOverride({
// ? Ensure all tests share the same database state
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { testApiHandler } from 'next-test-api-route-handler';
import { api, setupMockBackend } from 'testverse/fixtures';
import { api, setupMockBackend } from 'testverse/util';

jest.mock('universe/backend');
jest.mock(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { testApiHandler } from 'next-test-api-route-handler';
import { api, setupMockBackend } from 'testverse/fixtures';
import { api, setupMockBackend } from 'testverse/util';

jest.mock('universe/backend');
jest.mock(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { testApiHandler } from 'next-test-api-route-handler';
import { api, setupMockBackend } from 'testverse/fixtures';
import { api, setupMockBackend } from 'testverse/util';

jest.mock('universe/backend');
jest.mock(
Expand Down
Loading

0 comments on commit 692f912

Please sign in to comment.