From 871dc3a4b530c54b31f9969da2f42417355228ee Mon Sep 17 00:00:00 2001 From: Stephen Kilbourn Date: Fri, 3 Jan 2025 15:30:21 -0700 Subject: [PATCH] add tests for modals and middleware --- components/ErrorModal.test.tsx | 87 ++++++++++++++++++++++++ components/SuccessModal.test.tsx | 80 ++++++++++++++++++++++ middleware.test.ts | 72 ++++++++++++++++++++ middleware.ts | 7 +- package.json | 3 +- yarn.lock | 110 +++++++++++++++++++++++++++++-- 6 files changed, 353 insertions(+), 6 deletions(-) create mode 100644 components/ErrorModal.test.tsx create mode 100644 components/SuccessModal.test.tsx create mode 100644 middleware.test.ts diff --git a/components/ErrorModal.test.tsx b/components/ErrorModal.test.tsx new file mode 100644 index 0000000..b9421bb --- /dev/null +++ b/components/ErrorModal.test.tsx @@ -0,0 +1,87 @@ +import React from 'react'; +import { cleanup, render, screen } from '@testing-library/react'; +import { describe, it, expect, vi, afterEach } from 'vitest'; +import ErrorModal from './ErrorModal'; + +// Mock StyledModal +vi.mock('@/components/StyledModal', () => ({ + __esModule: true, + default: vi.fn(({ title, children }) => ( +
+

{title}

+
{children}
+
+ )), +})); + +describe('ErrorModal Component', () => { + afterEach(() => { + cleanup(); + }); + it('renders "Collection Name Exists" modal when API error contains "Reference already exists"', () => { + const props = { + collectionName: 'Test Collection', + apiErrorMessage: 'Reference already exists', + }; + + render(); + + // Check modal content + const modal = screen.getByTestId('styled-modal'); + expect(modal).toBeInTheDocument(); + expect(screen.getByText('Collection Name Exists')).toBeInTheDocument(); + expect( + screen.getByText( + /A branch with the collection name/i + ) + ).toBeInTheDocument(); + expect( + screen.getByText( + /Test Collection/i + ) + ).toBeInTheDocument(); + expect( + screen.getByText( + /already exists\./i + ) + ).toBeInTheDocument(); + expect( + screen.getByText(/Please try another collection name or delete the feature branch\./i) + ).toBeInTheDocument(); + }); + + it('renders generic error modal when API error message does not include "Reference already exists"', () => { + const props = { + collectionName: 'Test Collection', + apiErrorMessage: 'Unexpected error', + }; + + render(); + + // Check modal content + const modal = screen.getByTestId('styled-modal'); + expect(modal).toBeInTheDocument(); + expect(screen.getByText('Something Went Wrong')).toBeInTheDocument(); + expect( + screen.getByText(/Something went wrong with updating Test Collection\./i) + ).toBeInTheDocument(); + expect(screen.getByText(/Please try again\./i)).toBeInTheDocument(); + }); + + it('renders generic error modal when no API error message is provided', () => { + const props = { + collectionName: 'Test Collection', + }; + + render(); + + // Check modal content + const modal = screen.getByTestId('styled-modal'); + expect(modal).toBeInTheDocument(); + expect(screen.getByText('Something Went Wrong')).toBeInTheDocument(); + expect( + screen.getByText(/Something went wrong with updating Test Collection\./i) + ).toBeInTheDocument(); + expect(screen.getByText(/Please try again\./i)).toBeInTheDocument(); + }); +}); diff --git a/components/SuccessModal.test.tsx b/components/SuccessModal.test.tsx new file mode 100644 index 0000000..04e194e --- /dev/null +++ b/components/SuccessModal.test.tsx @@ -0,0 +1,80 @@ +import React from 'react'; +import { render, screen, fireEvent, cleanup } from '@testing-library/react'; +import { describe, it, vi, expect, afterEach } from 'vitest'; +import SuccessModal from './SuccessModal'; + + +// Mock StyledModal +vi.mock('./StyledModal', () => ({ + __esModule: true, + default: vi.fn(({ children, okText, onOk }) => ( +
+ {children} + +
+ )), +})); + +describe('SuccessModal Component', () => { + + afterEach(() => { + cleanup(); + }); + + it('renders correctly for "create" type', () => { + const mockSetStatus = vi.fn(); + const props = { + type: 'create' as const, + collectionName: 'Test Collection', + pullRequestUrl: 'https://github.com/test/pr', + setStatus: mockSetStatus, + }; + + render(); + + // Verify modal content + expect(screen.getByTestId('styled-modal')).toBeInTheDocument(); + expect( + screen.getByText(/collection has been submitted\./i) + ).toBeInTheDocument(); + expect(screen.getByRole('link', { name: /Github/i })).toHaveAttribute( + 'href', + 'https://github.com/test/pr' + ); + }); + + it('renders correctly for "edit" type', () => { + const mockSetStatus = vi.fn(); + const props = { + type: 'edit' as const, + collectionName: 'Edited Collection', + setStatus: mockSetStatus, + }; + + render(); + + // Verify modal content + expect(screen.getByTestId('styled-modal')).toBeInTheDocument(); + expect( + screen.getByText(/The update to/i) + ).toBeInTheDocument(); + }); + + it('calls setStatus with "idle" when OK is clicked', () => { + const mockSetStatus = vi.fn(); + const props = { + type: 'edit' as const, + collectionName: 'Edited Collection', + setStatus: mockSetStatus, + }; + + render(); + + // Simulate clicking the OK button + const okButton = screen.getByText('OK'); + fireEvent.click(okButton); + + // Verify setStatus is called + expect(mockSetStatus).toHaveBeenCalledWith('idle'); + }); +}); diff --git a/middleware.test.ts b/middleware.test.ts new file mode 100644 index 0000000..4949642 --- /dev/null +++ b/middleware.test.ts @@ -0,0 +1,72 @@ +import { describe, it, expect, vi } from 'vitest'; +import { NextRequest } from 'next/server'; +import { middleware } from './middleware'; +import { runWithAmplifyServerContext } from '@/utils/amplify-server-util'; +import { fetchAuthSession } from 'aws-amplify/auth/server'; + +// Mock dependencies +vi.mock('@/utils/amplify-server-util', () => ({ + runWithAmplifyServerContext: vi.fn(), +})); + +vi.mock('aws-amplify/auth/server', () => ({ + fetchAuthSession: vi.fn(), +})); + +// JWT Mock +const mockJWT = { + payload: { sub: 'user123', exp: Math.floor(Date.now() / 1000) + 3600 }, // Example payload + toString: () => 'mockJWT', +}; + +// List of protected routes +const protectedRoutes = [ + '/list-ingests', + '/retrieve-ingest', + '/api/create-ingest', + '/api/edit-ingest', +]; + +describe('Middleware - Protected Routes', () => { + protectedRoutes.forEach((route) => { + it(`allows authenticated users to proceed for ${route}`, async () => { + // Mock authenticated behavior + vi.mocked(runWithAmplifyServerContext).mockImplementation(async ({ operation }) => { + return operation({ + token: { value: Symbol('mockToken') }, + }); + }); + + vi.mocked(fetchAuthSession).mockResolvedValue({ + tokens: { accessToken: mockJWT }, + }); + + // Mock request and invoke middleware + const mockRequest = new NextRequest(`http://localhost${route}`); + const response = await middleware(mockRequest); + + expect(response.status).toBe(200); // Status 200 implies `NextResponse.next()` + }); + + it(`rejects unauthenticated users for ${route}`, async () => { + // Mock unauthenticated behavior + vi.mocked(runWithAmplifyServerContext).mockImplementation(async ({ operation }) => { + return operation({ + token: { value: Symbol('mockToken') }, + }); + }); + + vi.mocked(fetchAuthSession).mockResolvedValue({ + tokens: undefined, // Simulate missing tokens for unauthenticated users + }); + + // Mock request and invoke middleware + const mockRequest = new NextRequest(`http://localhost${route}`); + const response = await middleware(mockRequest); + const jsonResponse = await response.json(); + + expect(response.status).toBe(401); + expect(jsonResponse).toEqual({ message: 'Not Authenticated' }); + }); + }); +}); diff --git a/middleware.ts b/middleware.ts index 9962ff7..457b9b4 100644 --- a/middleware.ts +++ b/middleware.ts @@ -31,10 +31,15 @@ export async function middleware(request: NextRequest) { // user is not authenticated return NextResponse.json({ message: 'Not Authenticated' }, { status: 401 }); + } // This config will match all routes accept /login, /api, _next/static, /_next/image // favicon.ico export const config = { - matcher: ['/api/create-ingest'], + matcher: [ + '/api/list-ingests', + '/api/retrieve-ingest', + '/api/create-ingest', + ], }; diff --git a/package.json b/package.json index 2584d2e..242330f 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "lodash": "^4.17.21", "next": "15.0.3", "react": "19.0.0-rc-66855b96-20241106", - "react-dom": "19.0.0-rc-66855b96-20241106" + "react-dom": "19.0.0-rc-66855b96-20241106", + "vitest-tsconfig-paths": "^3.4.1" }, "devDependencies": { "@octokit/types": "^13.6.2", diff --git a/yarn.lock b/yarn.lock index 5cc7bf7..60ea975 100644 --- a/yarn.lock +++ b/yarn.lock @@ -999,6 +999,11 @@ resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz#b6c75a56a1947cc916ea058772d666a2c8932f31" integrity sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA== +"@cush/relative@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@cush/relative/-/relative-1.0.0.tgz#8cd1769bf9bde3bb27dac356b1bc94af40f6cc16" + integrity sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA== + "@emnapi/runtime@^1.2.0": version "1.3.1" resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.3.1.tgz#0fcaa575afc31f455fd33534c19381cfce6c6f60" @@ -1402,7 +1407,7 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jridgewell/gen-mapping@^0.3.5": +"@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": version "0.3.8" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== @@ -3172,6 +3177,11 @@ antd@^5.22.3: scroll-into-view-if-needed "^3.1.0" throttle-debounce "^5.0.2" +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -3574,6 +3584,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commander@~12.1.0: version "12.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" @@ -4543,7 +4558,12 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@^10.4.1: +glob-regex@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.3.2.tgz#27348f2f60648ec32a4a53137090b9fb934f3425" + integrity sha512-m5blUd3/OqDTWwzBBtWBPrGlAzatRywHameHeekAZyZrskYouOGdNB8T/q6JucucvJXtOuyHIn0/Yia7iDasDw== + +glob@^10.3.10, glob@^10.4.1: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== @@ -5183,6 +5203,11 @@ lilconfig@~3.1.3: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + lint-staged@^15.2.11: version "15.3.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.3.0.tgz#32a0b3f2f2b8825950bd3b9fb093e045353bdfa3" @@ -5421,6 +5446,15 @@ mute-stream@^2.0.0: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + nanoid@^3.3.6, nanoid@^3.3.7: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -5471,7 +5505,7 @@ nwsapi@^2.2.12: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.16.tgz#177760bba02c351df1d2644e220c31dfec8cdb43" integrity sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ== -object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -5686,6 +5720,11 @@ pidtree@~0.6.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== +pirates@^4.0.1: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + pngjs@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" @@ -6231,6 +6270,17 @@ react@19.0.0-rc-66855b96-20241106: resolved "https://registry.yarnpkg.com/react/-/react-19.0.0-rc-66855b96-20241106.tgz#f04d7283454a32bdd8e9757db4308b75b9739e56" integrity sha512-klH7xkT71SxRCx4hb1hly5FJB21Hz0ACyxbXYAECEqssUjtJeFUAaI2U1DgJAzkGEnvEm3DkxuBchMC/9K4ipg== +recrawl-sync@^2.0.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/recrawl-sync/-/recrawl-sync-2.2.3.tgz#757adcdaae4799466dde5b8ee52122ff9636dfb1" + integrity sha512-vSaTR9t+cpxlskkdUFrsEpnf67kSmPk66yAGT1fZPrDudxQjoMzPgQhSMImQ0pAw5k0NPirefQfhopSjhdUtpQ== + dependencies: + "@cush/relative" "^1.0.0" + glob-regex "^0.3.0" + slash "^3.0.0" + sucrase "^3.20.3" + tslib "^1.9.3" + redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -6587,6 +6637,11 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slice-ansi@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" @@ -6812,6 +6867,19 @@ stylis@^4.3.4: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.4.tgz#ca5c6c4a35c4784e4e93a2a24dc4e9fa075250a4" integrity sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now== +sucrase@^3.20.3: + version "3.35.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" + integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== + dependencies: + "@jridgewell/gen-mapping" "^0.3.2" + commander "^4.0.0" + glob "^10.3.10" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -6851,6 +6919,20 @@ test-exclude@^7.0.1: glob "^10.4.1" minimatch "^9.0.4" +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + throttle-debounce@^5.0.0, throttle-debounce@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-5.0.2.tgz#ec5549d84e053f043c9fd0f2a6dd892ff84456b1" @@ -6939,12 +7021,17 @@ ts-api-utils@^1.3.0: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + tsconfck@^3.0.3: version "3.1.4" resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.4.tgz#de01a15334962e2feb526824339b51be26712229" integrity sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ== -tsconfig-paths@^3.15.0: +tsconfig-paths@^3.15.0, tsconfig-paths@^3.9.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== @@ -6954,6 +7041,11 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.5.2, tslib@^2.6.2: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" @@ -7175,6 +7267,16 @@ vite@^5.0.0: optionalDependencies: fsevents "~2.3.3" +vitest-tsconfig-paths@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/vitest-tsconfig-paths/-/vitest-tsconfig-paths-3.4.1.tgz#5bc5f0c1fe9e966980f74ff68405a6044c3fe2a8" + integrity sha512-CnRpA/jcqgZfnkk0yvwFW92UmIpf03wX/wLiQBNWAcOG7nv6Sdz3GsPESAMEqbVy8kHBoWB3XeNamu6PUrFZLA== + dependencies: + debug "^4.1.1" + globrex "^0.1.2" + recrawl-sync "^2.0.3" + tsconfig-paths "^3.9.0" + vitest@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/vitest/-/vitest-2.1.8.tgz#2e6a00bc24833574d535c96d6602fb64163092fa"