From 1a3b924515aeb283e20778aa1336e6630eb1be41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djobbo=20Ma=C3=AFga?= Date: Wed, 10 Apr 2024 15:52:17 +0200 Subject: [PATCH] ci test --- .github/workflows/code-qa.yml | 6 +- .../CharacterQuizChoiceStepContent.tsx | 2 +- .../KeywordChallengeStepContent.test.tsx | 19 +++ app/level/[level]/round/[round]/Round.tsx | 2 +- app/level/[level]/round/[round]/Step.tsx | 2 +- app/level/[level]/round/[round]/page.tsx | 2 +- jest.config.js | 13 ++ jest.config.ts | 13 -- package.json | 1 - pnpm-lock.yaml | 128 +++--------------- .../LevelStore.tsx | 0 test-utils/renderWithContext.tsx | 11 ++ tsconfig.json | 1 - 13 files changed, 69 insertions(+), 131 deletions(-) create mode 100644 app/level/[level]/round/[round]/KeywordChallengeStepContent.test.tsx create mode 100644 jest.config.js delete mode 100644 jest.config.ts rename app/level/[level]/round/[round]/LevelStoreProvider.tsx => store/LevelStore.tsx (100%) create mode 100644 test-utils/renderWithContext.tsx diff --git a/.github/workflows/code-qa.yml b/.github/workflows/code-qa.yml index 42352de..78913f3 100644 --- a/.github/workflows/code-qa.yml +++ b/.github/workflows/code-qa.yml @@ -14,14 +14,16 @@ jobs: action: pnpm ts:check - name: Deadcode action: pnpm deadcode + - name: Test + action: pnpm test steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: - version: 8.5.0 + version: 8.15.6 - uses: actions/setup-node@v2 with: - node-version: 18 + node-version: 20 cache: "pnpm" cache-dependency-path: pnpm-lock.yaml - name: ${{ matrix.name }} diff --git a/app/level/[level]/round/[round]/CharacterQuizChoiceStepContent.tsx b/app/level/[level]/round/[round]/CharacterQuizChoiceStepContent.tsx index 933ed9d..a900577 100644 --- a/app/level/[level]/round/[round]/CharacterQuizChoiceStepContent.tsx +++ b/app/level/[level]/round/[round]/CharacterQuizChoiceStepContent.tsx @@ -2,7 +2,7 @@ import { type CharacterQuizChoiceStep } from "@/data/levels" import { useState } from "react" import { Button } from "@/components/Button" import { CharacterDisplay } from "@/components/CharacterDisplay" -import { useLevelStore } from "./LevelStoreProvider" +import { useLevelStore } from "@/store/LevelStore" type CharacterQuizChoiceStepContentProps = { step: CharacterQuizChoiceStep diff --git a/app/level/[level]/round/[round]/KeywordChallengeStepContent.test.tsx b/app/level/[level]/round/[round]/KeywordChallengeStepContent.test.tsx new file mode 100644 index 0000000..1384634 --- /dev/null +++ b/app/level/[level]/round/[round]/KeywordChallengeStepContent.test.tsx @@ -0,0 +1,19 @@ +import { renderWithContext } from "@/test-utils/renderWithContext" +import { KeywordChallengeStepContent } from "./KeywordChallengeStepContent" +import { StepType } from "@/data/levels" + +describe("KeywordChallengeStepContent", () => { + it("should render successfully", () => { + expect(() => { + renderWithContext( + , + ) + }).not.toThrow() + }) +}) diff --git a/app/level/[level]/round/[round]/Round.tsx b/app/level/[level]/round/[round]/Round.tsx index d23bcfe..1b134bb 100644 --- a/app/level/[level]/round/[round]/Round.tsx +++ b/app/level/[level]/round/[round]/Round.tsx @@ -1,6 +1,6 @@ "use client" -import { useLevelStore } from "./LevelStoreProvider" +import { useLevelStore } from "@/store/LevelStore" import { observer } from "mobx-react-lite" import { Step } from "./Step" diff --git a/app/level/[level]/round/[round]/Step.tsx b/app/level/[level]/round/[round]/Step.tsx index 0c270d1..28f54de 100644 --- a/app/level/[level]/round/[round]/Step.tsx +++ b/app/level/[level]/round/[round]/Step.tsx @@ -3,7 +3,7 @@ import { InfoStepContent } from "./InfoStepContent" import { CharacterQuizChoiceStepContent } from "./CharacterQuizChoiceStepContent" import { KeywordChallengeStepContent } from "./KeywordChallengeStepContent" import { observer } from "mobx-react-lite" -import { useLevelStore } from "./LevelStoreProvider" +import { useLevelStore } from "@/store/LevelStore" import { AnimatePresence } from "framer-motion" import { StepType } from "@/data/levels" diff --git a/app/level/[level]/round/[round]/page.tsx b/app/level/[level]/round/[round]/page.tsx index 91f5f8e..e7faa57 100644 --- a/app/level/[level]/round/[round]/page.tsx +++ b/app/level/[level]/round/[round]/page.tsx @@ -2,7 +2,7 @@ import z from "zod" import { levels } from "@/data/levels" import { RedirectType, redirect } from "next/navigation" import { Round } from "./Round" -import { LevelStoreProvider } from "./LevelStoreProvider" +import { LevelStoreProvider } from "@/store/LevelStore" const paramsSchema = z.object({ level: z.number({ coerce: true }).int().catch(1), diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..9a29ca3 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,13 @@ +const nextJest = require("next/jest.js") + +const createJestConfig = nextJest({ + dir: "./", +}) + +/** @type {import('jest').Config} */ +const config = { + coverageProvider: "v8", + testEnvironment: "jsdom", +} + +module.exports = createJestConfig(config) diff --git a/jest.config.ts b/jest.config.ts deleted file mode 100644 index c9fe6f1..0000000 --- a/jest.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Config } from "jest" -import nextJest from "next/jest.js" - -const createJestConfig = nextJest({ - dir: "./", -}) - -const config: Config = { - coverageProvider: "v8", - testEnvironment: "jsdom", -} - -export default createJestConfig(config) diff --git a/package.json b/package.json index 8ef9978..9de60aa 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "postcss": "^8", "prettier": "^3.2.5", "tailwindcss": "^3.3.0", - "ts-node": "^10.9.2", "typescript": "^5.4.4" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index adc2a25..56a09ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,7 +69,7 @@ devDependencies: version: 5.1.3(eslint@8.57.0)(prettier@3.2.5) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + version: 29.7.0(@types/node@20.12.7) jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0 @@ -84,10 +84,7 @@ devDependencies: version: 3.2.5 tailwindcss: specifier: ^3.3.0 - version: 3.4.3(ts-node@10.9.2) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@20.12.7)(typescript@5.4.4) + version: 3.4.3 typescript: specifier: ^5.4.4 version: 5.4.4 @@ -430,13 +427,6 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@cspotcode/source-map-support@0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - dev: true - /@ericcornelissen/bash-parser@0.5.2: resolution: {integrity: sha512-4pIMTa1nEFfMXitv7oaNEWOdM+zpOZavesa5GaiWTgda6Zk32CFGxjUp/iIaN0PwgUW1yTq/fztSjbpE8SLGZQ==} engines: {node: '>=4'} @@ -559,7 +549,7 @@ packages: slash: 3.0.0 dev: true - /@jest/core@29.7.0(ts-node@10.9.2): + /@jest/core@29.7.0: resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -580,7 +570,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@20.12.7) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -786,13 +776,6 @@ packages: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - /@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - dev: true - /@next/env@14.1.4: resolution: {integrity: sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ==} dev: false @@ -1193,7 +1176,7 @@ packages: chalk: 3.0.0 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 - jest: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + jest: 29.7.0(@types/node@20.12.7) lodash: 4.17.21 redent: 3.0.0 dev: true @@ -1217,22 +1200,6 @@ packages: engines: {node: '>= 10'} dev: true - /@tsconfig/node10@1.0.11: - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - dev: true - - /@tsconfig/node12@1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true - - /@tsconfig/node14@1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true - - /@tsconfig/node16@1.0.4: - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - dev: true - /@types/aria-query@5.0.4: resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} dev: true @@ -1541,10 +1508,6 @@ packages: picomatch: 2.3.1 dev: true - /arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true - /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: true @@ -2042,7 +2005,7 @@ packages: /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - /create-jest@29.7.0(@types/node@20.12.7)(ts-node@10.9.2): + /create-jest@29.7.0(@types/node@20.12.7): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -2051,7 +2014,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@20.12.7) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -2061,10 +2024,6 @@ packages: - ts-node dev: true - /create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2275,11 +2234,6 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: true - /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -3712,7 +3666,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@20.12.7)(ts-node@10.9.2): + /jest-cli@29.7.0(@types/node@20.12.7): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -3722,14 +3676,14 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2) + '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + create-jest: 29.7.0(@types/node@20.12.7) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@20.12.7) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -3740,7 +3694,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@20.12.7)(ts-node@10.9.2): + /jest-config@29.7.0(@types/node@20.12.7): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -3775,7 +3729,6 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@20.12.7)(typescript@5.4.4) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4087,7 +4040,7 @@ packages: supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@20.12.7)(ts-node@10.9.2): + /jest@29.7.0(@types/node@20.12.7): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -4097,10 +4050,10 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2) + '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.12.7)(ts-node@10.9.2) + jest-cli: 29.7.0(@types/node@20.12.7) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4396,10 +4349,6 @@ packages: semver: 7.6.0 dev: true - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true - /makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} dependencies: @@ -4994,7 +4943,7 @@ packages: postcss: 8.4.38 dev: true - /postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2): + /postcss-load-config@4.0.2(postcss@8.4.38): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} peerDependencies: @@ -5008,7 +4957,6 @@ packages: dependencies: lilconfig: 3.1.1 postcss: 8.4.38 - ts-node: 10.9.2(@types/node@20.12.7)(typescript@5.4.4) yaml: 2.4.1 dev: true @@ -5735,7 +5683,7 @@ packages: '@babel/runtime': 7.24.4 dev: false - /tailwindcss@3.4.3(ts-node@10.9.2): + /tailwindcss@3.4.3: resolution: {integrity: sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==} engines: {node: '>=14.0.0'} hasBin: true @@ -5757,7 +5705,7 @@ packages: postcss: 8.4.38 postcss-import: 15.1.0(postcss@8.4.38) postcss-js: 4.0.1(postcss@8.4.38) - postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2) + postcss-load-config: 4.0.2(postcss@8.4.38) postcss-nested: 6.0.1(postcss@8.4.38) postcss-selector-parser: 6.0.16 resolve: 1.22.8 @@ -5864,37 +5812,6 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-node@10.9.2(@types/node@20.12.7)(typescript@5.4.4): - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.12.7 - acorn: 8.11.3 - acorn-walk: 8.3.2 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.4.4 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: @@ -6055,10 +5972,6 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true - /v8-to-istanbul@9.2.0: resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} engines: {node: '>=10.12.0'} @@ -6299,11 +6212,6 @@ packages: yargs-parser: 21.1.1 dev: true - /yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: true - /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} diff --git a/app/level/[level]/round/[round]/LevelStoreProvider.tsx b/store/LevelStore.tsx similarity index 100% rename from app/level/[level]/round/[round]/LevelStoreProvider.tsx rename to store/LevelStore.tsx diff --git a/test-utils/renderWithContext.tsx b/test-utils/renderWithContext.tsx new file mode 100644 index 0000000..8642ca2 --- /dev/null +++ b/test-utils/renderWithContext.tsx @@ -0,0 +1,11 @@ +import { LevelStoreProvider } from "@/store/LevelStore" +import { ReactNode } from "react" +import { render } from "@testing-library/react" + +export const renderWithContext = (children: ReactNode) => { + render( + + {children} + , + ) +} diff --git a/tsconfig.json b/tsconfig.json index 9103ed9..cc80778 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,7 +32,6 @@ "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - "jest.config.ts", ], "exclude": [ "node_modules"