From 2fc27634217b5a426be026c6f9e582a0dd16dafc Mon Sep 17 00:00:00 2001 From: Arianrhod Sandlot Date: Wed, 22 Jan 2025 11:25:57 +0800 Subject: [PATCH] test: migrate to node test runner from vitest --- package.json | 13 +- pnpm-lock.yaml | 604 +-------------------------- src/classes/emulator-file-system.ts | 14 +- src/classes/emulator-options.ts | 8 +- src/classes/emulator.ts | 14 +- src/classes/nostalgist.ts | 12 +- src/index-umd.ts | 2 +- src/index.ts | 2 +- src/libs/emscripten.ts | 2 +- src/libs/options.ts | 6 +- src/libs/utils.ts | 2 +- tests/e2e/playwright.config.ts | 4 +- tests/integration/nostalgist.spec.ts | 193 ++++----- tests/integration/vitest.config.ts | 9 - 14 files changed, 156 insertions(+), 729 deletions(-) delete mode 100644 tests/integration/vitest.config.ts diff --git a/package.json b/package.json index 7a86aa6..4f7efea 100644 --- a/package.json +++ b/package.json @@ -42,11 +42,11 @@ "docs:build": "astro build --root docs", "docs:dev": "astro dev --root docs", "eslint": "eslint --no-warn-ignored", - "lint": "node --run=eslint -- src", + "lint": "node --run=eslint -- src tests", "prepare": "simple-git-hooks", - "test": "vitest run -c tests/integration/vitest.config && pnpm build && pnpm test:e2e", + "test": "node --run=test:integration && node --run=test:e2e", "test:e2e": "playwright test -c tests/e2e", - "test:integration": "vitest -c tests/integration/vitest.config" + "test:integration": "node --test tests/integration/**/*.spec.ts" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" @@ -64,6 +64,7 @@ "@arianrhodsandlot/eslint-config": "0.17.1", "@arianrhodsandlot/release-kit": "0.1.6", "@astrojs/starlight": "0.31.1", + "@happy-dom/global-registrator": "16.7.2", "@playwright/test": "1.49.1", "@types/is-ci": "3.0.4", "@types/node": "22.10.7", @@ -72,16 +73,12 @@ "eslint": "9.18.0", "ini": "5.0.0", "is-ci": "4.1.0", - "jiti": "2.4.2", - "jsdom": "26.0.0", "lint-staged": "15.4.1", "path-browserify": "1.0.1", - "serve": "14.2.4", "sharp": "0.33.5", "simple-git-hooks": "2.11.1", "typescript": "5.7.3", - "vite": "6.0.10", - "vitest": "3.0.2" + "vite": "6.0.10" }, "packageManager": "pnpm@9.15.4" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 201c2d6..9c7f3d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,6 +27,9 @@ importers: '@astrojs/starlight': specifier: 0.31.1 version: 0.31.1(astro@5.1.8(@types/node@22.10.7)(jiti@2.4.2)(rollup@4.31.0)(stylus@0.57.0)(typescript@5.7.3)(yaml@2.7.0)) + '@happy-dom/global-registrator': + specifier: 16.7.2 + version: 16.7.2 '@playwright/test': specifier: 1.49.1 version: 1.49.1 @@ -51,12 +54,6 @@ importers: is-ci: specifier: 4.1.0 version: 4.1.0 - jiti: - specifier: 2.4.2 - version: 2.4.2 - jsdom: - specifier: 26.0.0 - version: 26.0.0 lint-staged: specifier: 15.4.1 version: 15.4.1 @@ -78,9 +75,6 @@ importers: vite: specifier: 6.0.10 version: 6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0) - vitest: - specifier: 3.0.2 - version: 3.0.2(@types/node@22.10.7)(happy-dom@16.2.6)(jiti@2.4.2)(jsdom@26.0.0)(stylus@0.57.0)(yaml@2.7.0) packages: @@ -101,9 +95,6 @@ packages: resolution: {integrity: sha512-hLbgjuF946WfSxZ0cvRSe2E71Pp/HN3uur01LjlkRlK4d6U1o1b3OK1DF8i1tC92gXBlUiX/hNP/IEnZwSuGxg==} hasBin: true - '@asamuzakjp/css-color@2.8.3': - resolution: {integrity: sha512-GIc76d9UI1hCvOATjZPyHFmE5qhRccp3/zGfMPapK3jBi+yocEzp6BBB0UnfRYP9NP4FANqUZYb0hnfs3TM3hw==} - '@astrojs/compiler@2.10.3': resolution: {integrity: sha512-bL/O7YBxsFt55YHU021oL+xz+B/9HvGNId3F9xURN16aeqDK9juHGktdkCSXz+U4nqFACq6ZFvWomOzhV+zfPw==} @@ -710,34 +701,6 @@ packages: '@biomejs/wasm-nodejs@1.9.4': resolution: {integrity: sha512-ZqNlhKcZW6MW1LxWIOfh9YVrBykvzyFad3bOh6JJFraDnNa3NXboRDiaI8dmrbb0ZHXCU1Tsq6WQsKV2Vpp5dw==} - '@csstools/color-helpers@5.0.1': - resolution: {integrity: sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==} - engines: {node: '>=18'} - - '@csstools/css-calc@2.1.1': - resolution: {integrity: sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==} - engines: {node: '>=18'} - peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.4 - '@csstools/css-tokenizer': ^3.0.3 - - '@csstools/css-color-parser@3.0.7': - resolution: {integrity: sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==} - engines: {node: '>=18'} - peerDependencies: - '@csstools/css-parser-algorithms': ^3.0.4 - '@csstools/css-tokenizer': ^3.0.3 - - '@csstools/css-parser-algorithms@3.0.4': - resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} - engines: {node: '>=18'} - peerDependencies: - '@csstools/css-tokenizer': ^3.0.3 - - '@csstools/css-tokenizer@3.0.3': - resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} - engines: {node: '>=18'} - '@ctrl/tinycolor@4.1.0': resolution: {integrity: sha512-WyOx8cJQ+FQus4Mm4uPIZA64gbk3Wxh0so5Lcii0aJifqwoVOlfFtorjLE0Hen4OYyHZMXDWqMmaQemBhgxFRQ==} engines: {node: '>=14'} @@ -1012,6 +975,10 @@ packages: '@expressive-code/plugin-text-markers@0.40.1': resolution: {integrity: sha512-LsirF7M4F2yWgrFXEocD74F/MaVXsOsHVsRxBLhXQJemSSkWkDp/EZPt//OaqQ8ExnqWZ2lH7E1/KiN46unKjg==} + '@happy-dom/global-registrator@16.7.2': + resolution: {integrity: sha512-xz1OO4DNr8Wki0sGG4VF/tM7mY6/cf0y0rxBhMzfk2LXqMA0DUFOTv9hQtHSZHGEhfJ2ZUJa02WAp4Ihq1MT8Q==} + engines: {node: '>=18.0.0'} + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -1511,35 +1478,6 @@ packages: '@ungap/structured-clone@1.2.1': resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} - '@vitest/expect@3.0.2': - resolution: {integrity: sha512-dKSHLBcoZI+3pmP5hiZ7I5grNru2HRtEW8Z5Zp4IXog8QYcxhlox7JUPyIIFWfN53+3HW3KPLIl6nSzUGgKSuQ==} - - '@vitest/mocker@3.0.2': - resolution: {integrity: sha512-Hr09FoBf0jlwwSyzIF4Xw31OntpO3XtZjkccpcBf8FeVW3tpiyKlkeUzxS/txzHqpUCNIX157NaTySxedyZLvA==} - peerDependencies: - msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 - peerDependenciesMeta: - msw: - optional: true - vite: - optional: true - - '@vitest/pretty-format@3.0.2': - resolution: {integrity: sha512-yBohcBw/T/p0/JRgYD+IYcjCmuHzjC3WLAKsVE4/LwiubzZkE8N49/xIQ/KGQwDRA8PaviF8IRO8JMWMngdVVQ==} - - '@vitest/runner@3.0.2': - resolution: {integrity: sha512-GHEsWoncrGxWuW8s405fVoDfSLk6RF2LCXp6XhevbtDjdDme1WV/eNmUueDfpY1IX3MJaCRelVCEXsT9cArfEg==} - - '@vitest/snapshot@3.0.2': - resolution: {integrity: sha512-h9s67yD4+g+JoYG0zPCo/cLTabpDqzqNdzMawmNPzDStTiwxwkyYM1v5lWE8gmGv3SVJ2DcxA2NpQJZJv9ym3g==} - - '@vitest/spy@3.0.2': - resolution: {integrity: sha512-8mI2iUn+PJFMT44e3ISA1R+K6ALVs47W6eriDTfXe6lFqlflID05MB4+rIFhmDSLBj8iBsZkzBYlgSkinxLzSQ==} - - '@vitest/utils@3.0.2': - resolution: {integrity: sha512-Qu01ZYZlgHvDP02JnMBRpX43nRaZtNpIzw3C1clDXmn8eakgX6iQVGzTQ/NjkIr64WD8ioqOjkaYRVvHQI5qiw==} - '@zeit/schemas@2.36.0': resolution: {integrity: sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==} @@ -1557,10 +1495,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - agent-base@7.1.3: - resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} - engines: {node: '>= 14'} - ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -1640,10 +1574,6 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} - assertion-error@2.0.1: - resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} - engines: {node: '>=12'} - ast-metadata-inferer@0.8.1: resolution: {integrity: sha512-ht3Dm6Zr7SXv6t1Ra6gFo0+kLDglHGrEbYihTkcycrbHw7WCcuhBzPlJYHEsIpycaUwzsJHje+vUcxXUX4ztTA==} @@ -1664,9 +1594,6 @@ packages: engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - atob@2.1.2: resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} engines: {node: '>= 4.5.0'} @@ -1759,10 +1686,6 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - call-bind-apply-helpers@1.0.1: resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} engines: {node: '>= 0.4'} @@ -1797,10 +1720,6 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chai@5.1.2: - resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} - engines: {node: '>=12'} - chalk-template@0.4.0: resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} engines: {node: '>=12'} @@ -1829,10 +1748,6 @@ packages: character-reference-invalid@2.0.1: resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} - check-error@2.1.1: - resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} - engines: {node: '>= 16'} - chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -1889,10 +1804,6 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -1981,17 +1892,9 @@ packages: engines: {node: '>=4'} hasBin: true - cssstyle@4.2.1: - resolution: {integrity: sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==} - engines: {node: '>=18'} - damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} - data-urls@5.0.0: - resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} - engines: {node: '>=18'} - data-view-buffer@1.0.2: resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} @@ -2029,9 +1932,6 @@ packages: supports-color: optional: true - decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} @@ -2039,10 +1939,6 @@ packages: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} - deep-eql@5.0.2: - resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} - engines: {node: '>=6'} - deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -2061,10 +1957,6 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -2534,10 +2426,6 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - expect-type@1.1.0: - resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} - engines: {node: '>=12.0.0'} - expressive-code@0.40.1: resolution: {integrity: sha512-jBsTRX+MPsqiqYQsE9vRXMiAkUafU11j2zuWAaOX9vubLutNB0er8c0FJWeudVDH5D52V4Lf4vTIqbOE54PUcQ==} @@ -2608,10 +2496,6 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} - form-data@4.0.1: - resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} - engines: {node: '>= 6'} - fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -2721,8 +2605,8 @@ packages: h3@1.13.1: resolution: {integrity: sha512-u/z6Z4YY+ANZ05cRRfsFJadTBrNA6e3jxdU+AN5UCbZSZEUwgHiwjvUEe0k1NoQmAvQmETwr+xB5jd7mhCJuIQ==} - happy-dom@16.2.6: - resolution: {integrity: sha512-pl9wpbvThd2BGptDW/DbeZgCVjjFJAe1+rGJ4SdXd1nLhGngaklpGohKlX6bSJwLH8vSi4VDhQsC2Mqa6eiyhg==} + happy-dom@16.7.2: + resolution: {integrity: sha512-zOzw0xyYlDaF/ylwbAsduYZZVRTd5u7IwlFkGbEathIeJMLp3vrN3cHm3RS7PZpD9gr/IO16bHEswcgNyWTsqw==} engines: {node: '>=18.0.0'} has-bigints@1.1.0: @@ -2815,10 +2699,6 @@ packages: hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - html-encoding-sniffer@4.0.0: - resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} - engines: {node: '>=18'} - html-escaper@3.0.3: resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} @@ -2831,14 +2711,6 @@ packages: http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} - http-proxy-agent@7.0.2: - resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} - engines: {node: '>= 14'} - - https-proxy-agent@7.0.6: - resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} - engines: {node: '>= 14'} - human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -2850,10 +2722,6 @@ packages: i18next@23.16.8: resolution: {integrity: sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg==} - iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -3035,9 +2903,6 @@ packages: resolution: {integrity: sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -3125,15 +2990,6 @@ packages: resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} engines: {node: '>=12.0.0'} - jsdom@26.0.0: - resolution: {integrity: sha512-BZYDGVAIriBWTpIxYzrXjv3E/4u8+/pSG5bQdIYCbNCGOvsPkDQfTVLAIXAf9ETdCpduCVTkDe2NNZ8NIwUVzw==} - engines: {node: '>=18'} - peerDependencies: - canvas: ^3.0.0 - peerDependenciesMeta: - canvas: - optional: true - jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -3252,9 +3108,6 @@ packages: longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} - loupe@3.1.2: - resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} - lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -3577,9 +3430,6 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - nwsapi@2.2.16: - resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -3743,13 +3593,6 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathe@2.0.2: - resolution: {integrity: sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==} - - pathval@2.0.0: - resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} - engines: {node: '>= 14.16'} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -4081,9 +3924,6 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rrweb-cssom@0.8.0: - resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} - run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -4117,10 +3957,6 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} - saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - scslre@0.3.0: resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} engines: {node: ^14.0.0 || >=16.0.0} @@ -4189,9 +4025,6 @@ packages: resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} - siginfo@2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -4265,12 +4098,6 @@ packages: stable-hash@0.0.4: resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} - stackback@0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} - stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} @@ -4364,9 +4191,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.9.2: resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -4387,43 +4211,13 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - tinybench@2.9.0: - resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinypool@1.0.2: - resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} - engines: {node: ^18.0.0 || >=20.0.0} - - tinyrainbow@2.0.0: - resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} - engines: {node: '>=14.0.0'} - - tinyspy@3.0.2: - resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} - engines: {node: '>=14.0.0'} - - tldts-core@6.1.73: - resolution: {integrity: sha512-k1g5eX87vxu3g//6XMn62y4qjayu4cYby/PF7Ksnh4F4uUK1Z1ze/mJ4a+y5OjdJ+cXRp+YTInZhH+FGdUWy1w==} - - tldts@6.1.73: - resolution: {integrity: sha512-/h4bVmuEMm57c2uCiAf1Q9mlQk7cA22m+1Bu0K92vUUtTVT9D4mOFWD9r4WQuTULcG9eeZtNKhLl0Il1LdKGog==} - hasBin: true - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - tough-cookie@5.1.0: - resolution: {integrity: sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==} - engines: {node: '>=16'} - - tr46@5.0.0: - resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} - engines: {node: '>=18'} - trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -4670,11 +4464,6 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite-node@3.0.2: - resolution: {integrity: sha512-hsEQerBAHvVAbv40m3TFQe/lTEbOp7yDpyqMJqr2Tnd+W58+DEYOt+fluQgekOePcsNBmR77lpVAnIU2Xu4SvQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - vite@6.0.10: resolution: {integrity: sha512-MEszunEcMo6pFsfXN1GhCFQqnE25tWRH0MA4f0Q7uanACi4y1Us+ZGpTMnITwCTnYzB2b9cpmnelTlxgTBmaBA==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -4723,41 +4512,12 @@ packages: vite: optional: true - vitest@3.0.2: - resolution: {integrity: sha512-5bzaHakQ0hmVVKLhfh/jXf6oETDBtgPo8tQCHYB+wftNgFJ+Hah67IsWc8ivx4vFL025Ow8UiuTf4W57z4izvQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.0.2 - '@vitest/ui': 3.0.2 - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@types/node': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - vue-eslint-parser@9.4.3: resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' - w3c-xmlserializer@5.0.0: - resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} - engines: {node: '>=18'} - web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} @@ -4765,22 +4525,10 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} - whatwg-encoding@3.1.1: - resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} - engines: {node: '>=18'} - whatwg-mimetype@3.0.0: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} - whatwg-mimetype@4.0.0: - resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} - engines: {node: '>=18'} - - whatwg-url@14.1.0: - resolution: {integrity: sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==} - engines: {node: '>=18'} - which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -4810,11 +4558,6 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.3.0: - resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} - engines: {node: '>=8'} - hasBin: true - widest-line@4.0.1: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} @@ -4842,29 +4585,10 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} - xml-name-validator@5.0.0: - resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} - engines: {node: '>=18'} - - xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - xxhash-wasm@1.1.0: resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} @@ -4999,14 +4723,6 @@ snapshots: semver: 7.6.3 zx: 8.3.0 - '@asamuzakjp/css-color@2.8.3': - dependencies: - '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-color-parser': 3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 - lru-cache: 10.4.3 - '@astrojs/compiler@2.10.3': {} '@astrojs/internal-helpers@0.4.2': {} @@ -5837,26 +5553,6 @@ snapshots: '@biomejs/wasm-nodejs@1.9.4': {} - '@csstools/color-helpers@5.0.1': {} - - '@csstools/css-calc@2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': - dependencies: - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 - - '@csstools/css-color-parser@3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': - dependencies: - '@csstools/color-helpers': 5.0.1 - '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) - '@csstools/css-tokenizer': 3.0.3 - - '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': - dependencies: - '@csstools/css-tokenizer': 3.0.3 - - '@csstools/css-tokenizer@3.0.3': {} - '@ctrl/tinycolor@4.1.0': {} '@deno/shim-deno-test@0.4.0': {} @@ -6142,6 +5838,10 @@ snapshots: dependencies: '@expressive-code/core': 0.40.1 + '@happy-dom/global-registrator@16.7.2': + dependencies: + happy-dom: 16.7.2 + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': @@ -6646,46 +6346,6 @@ snapshots: '@ungap/structured-clone@1.2.1': {} - '@vitest/expect@3.0.2': - dependencies: - '@vitest/spy': 3.0.2 - '@vitest/utils': 3.0.2 - chai: 5.1.2 - tinyrainbow: 2.0.0 - - '@vitest/mocker@3.0.2(vite@6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0))': - dependencies: - '@vitest/spy': 3.0.2 - estree-walker: 3.0.3 - magic-string: 0.30.17 - optionalDependencies: - vite: 6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0) - - '@vitest/pretty-format@3.0.2': - dependencies: - tinyrainbow: 2.0.0 - - '@vitest/runner@3.0.2': - dependencies: - '@vitest/utils': 3.0.2 - pathe: 2.0.2 - - '@vitest/snapshot@3.0.2': - dependencies: - '@vitest/pretty-format': 3.0.2 - magic-string: 0.30.17 - pathe: 2.0.2 - - '@vitest/spy@3.0.2': - dependencies: - tinyspy: 3.0.2 - - '@vitest/utils@3.0.2': - dependencies: - '@vitest/pretty-format': 3.0.2 - loupe: 3.1.2 - tinyrainbow: 2.0.0 - '@zeit/schemas@2.36.0': {} accepts@1.3.8: @@ -6699,8 +6359,6 @@ snapshots: acorn@8.14.0: {} - agent-base@7.1.3: {} - ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -6794,8 +6452,6 @@ snapshots: get-intrinsic: 1.2.7 is-array-buffer: 3.0.5 - assertion-error@2.0.1: {} - ast-metadata-inferer@0.8.1: dependencies: '@mdn/browser-compat-data': 5.6.31 @@ -6906,8 +6562,6 @@ snapshots: - uploadthing - yaml - asynckit@0.4.0: {} - atob@2.1.2: {} available-typed-arrays@1.0.7: @@ -7010,8 +6664,6 @@ snapshots: bytes@3.1.2: {} - cac@6.7.14: {} - call-bind-apply-helpers@1.0.1: dependencies: es-errors: 1.3.0 @@ -7041,14 +6693,6 @@ snapshots: ccount@2.0.1: {} - chai@5.1.2: - dependencies: - assertion-error: 2.0.1 - check-error: 2.1.1 - deep-eql: 5.0.2 - loupe: 3.1.2 - pathval: 2.0.0 - chalk-template@0.4.0: dependencies: chalk: 4.1.2 @@ -7070,8 +6714,6 @@ snapshots: character-reference-invalid@2.0.1: {} - check-error@2.1.1: {} - chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -7131,10 +6773,6 @@ snapshots: colorette@2.0.20: {} - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - comma-separated-tokens@2.0.3: {} commander@12.1.0: {} @@ -7215,18 +6853,8 @@ snapshots: cssesc@3.0.0: {} - cssstyle@4.2.1: - dependencies: - '@asamuzakjp/css-color': 2.8.3 - rrweb-cssom: 0.8.0 - damerau-levenshtein@1.0.8: {} - data-urls@5.0.0: - dependencies: - whatwg-mimetype: 4.0.0 - whatwg-url: 14.1.0 - data-view-buffer@1.0.2: dependencies: call-bound: 1.0.3 @@ -7257,16 +6885,12 @@ snapshots: dependencies: ms: 2.1.3 - decimal.js@10.4.3: {} - decode-named-character-reference@1.0.2: dependencies: character-entities: 2.0.2 decode-uri-component@0.2.2: {} - deep-eql@5.0.2: {} - deep-extend@0.6.0: {} deep-is@0.1.4: {} @@ -7285,8 +6909,6 @@ snapshots: defu@6.1.4: {} - delayed-stream@1.0.0: {} - dequal@2.0.3: {} destr@2.0.3: {} @@ -8027,8 +7649,6 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - expect-type@1.1.0: {} - expressive-code@0.40.1: dependencies: '@expressive-code/core': 0.40.1 @@ -8109,12 +7729,6 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@4.0.1: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - fs.realpath@1.0.0: {} fsevents@2.3.2: @@ -8236,11 +7850,10 @@ snapshots: uncrypto: 0.1.3 unenv: 1.10.0 - happy-dom@16.2.6: + happy-dom@16.7.2: dependencies: webidl-conversions: 7.0.0 whatwg-mimetype: 3.0.0 - optional: true has-bigints@1.1.0: {} @@ -8455,10 +8068,6 @@ snapshots: hosted-git-info@2.8.9: {} - html-encoding-sniffer@4.0.0: - dependencies: - whatwg-encoding: 3.1.1 - html-escaper@3.0.3: {} html-void-elements@3.0.0: {} @@ -8467,20 +8076,6 @@ snapshots: http-cache-semantics@4.1.1: {} - http-proxy-agent@7.0.2: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0 - transitivePeerDependencies: - - supports-color - - https-proxy-agent@7.0.6: - dependencies: - agent-base: 7.1.3 - debug: 4.4.0 - transitivePeerDependencies: - - supports-color - human-signals@2.1.0: {} human-signals@5.0.0: {} @@ -8489,10 +8084,6 @@ snapshots: dependencies: '@babel/runtime': 7.26.0 - iconv-lite@0.6.3: - dependencies: - safer-buffer: 2.1.2 - ignore@5.3.2: {} ignore@6.0.2: {} @@ -8655,8 +8246,6 @@ snapshots: is-port-reachable@4.0.0: {} - is-potential-custom-element-name@1.0.1: {} - is-regex@1.2.1: dependencies: call-bound: 1.0.3 @@ -8720,7 +8309,8 @@ snapshots: jiti@1.21.7: {} - jiti@2.4.2: {} + jiti@2.4.2: + optional: true jju@1.4.0: {} @@ -8737,34 +8327,6 @@ snapshots: jsdoc-type-pratt-parser@4.1.0: {} - jsdom@26.0.0: - dependencies: - cssstyle: 4.2.1 - data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.1 - html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.6 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.16 - parse5: 7.2.1 - rrweb-cssom: 0.8.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 5.1.0 - w3c-xmlserializer: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 3.1.1 - whatwg-mimetype: 4.0.0 - whatwg-url: 14.1.0 - ws: 8.18.0 - xml-name-validator: 5.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - jsesc@0.5.0: {} jsesc@3.0.2: {} @@ -8883,8 +8445,6 @@ snapshots: longest-streak@3.1.0: {} - loupe@3.1.2: {} - lru-cache@10.4.3: {} lru-cache@5.1.1: @@ -9473,8 +9033,6 @@ snapshots: dependencies: boolbase: 1.0.0 - nwsapi@2.2.16: {} - object-assign@4.1.1: {} object-hash@3.0.0: {} @@ -9658,10 +9216,6 @@ snapshots: pathe@1.1.2: {} - pathe@2.0.2: {} - - pathval@2.0.0: {} - picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -10088,8 +9642,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.31.0 fsevents: 2.3.3 - rrweb-cssom@0.8.0: {} - run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -10127,10 +9679,6 @@ snapshots: sax@1.4.1: {} - saxes@6.0.0: - dependencies: - xmlchars: 2.2.0 - scslre@0.3.0: dependencies: '@eslint-community/regexpp': 4.12.1 @@ -10262,8 +9810,6 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 - siginfo@2.0.0: {} - signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -10331,10 +9877,6 @@ snapshots: stable-hash@0.0.4: {} - stackback@0.0.2: {} - - std-env@3.8.0: {} - stream-replace-string@2.0.0: {} string-argv@0.3.2: {} @@ -10446,8 +9988,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - symbol-tree@3.2.4: {} - synckit@0.9.2: dependencies: '@pkgr/core': 0.1.1 @@ -10490,34 +10030,12 @@ snapshots: dependencies: any-promise: 1.3.0 - tinybench@2.9.0: {} - tinyexec@0.3.2: {} - tinypool@1.0.2: {} - - tinyrainbow@2.0.0: {} - - tinyspy@3.0.2: {} - - tldts-core@6.1.73: {} - - tldts@6.1.73: - dependencies: - tldts-core: 6.1.73 - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - tough-cookie@5.1.0: - dependencies: - tldts: 6.1.73 - - tr46@5.0.0: - dependencies: - punycode: 2.3.1 - trim-lines@3.0.1: {} trough@2.2.0: {} @@ -10740,27 +10258,6 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@3.0.2(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0): - dependencies: - cac: 6.7.14 - debug: 4.4.0 - es-module-lexer: 1.6.0 - pathe: 2.0.2 - vite: 6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - vite@6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0): dependencies: esbuild: 0.24.2 @@ -10777,46 +10274,6 @@ snapshots: optionalDependencies: vite: 6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0) - vitest@3.0.2(@types/node@22.10.7)(happy-dom@16.2.6)(jiti@2.4.2)(jsdom@26.0.0)(stylus@0.57.0)(yaml@2.7.0): - dependencies: - '@vitest/expect': 3.0.2 - '@vitest/mocker': 3.0.2(vite@6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0)) - '@vitest/pretty-format': 3.0.2 - '@vitest/runner': 3.0.2 - '@vitest/snapshot': 3.0.2 - '@vitest/spy': 3.0.2 - '@vitest/utils': 3.0.2 - chai: 5.1.2 - debug: 4.4.0 - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 2.0.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.2 - tinypool: 1.0.2 - tinyrainbow: 2.0.0 - vite: 6.0.10(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0) - vite-node: 3.0.2(@types/node@22.10.7)(jiti@2.4.2)(stylus@0.57.0)(yaml@2.7.0) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 22.10.7 - happy-dom: 16.2.6 - jsdom: 26.0.0 - transitivePeerDependencies: - - jiti - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - vue-eslint-parser@9.4.3(eslint@9.18.0(jiti@2.4.2)): dependencies: debug: 4.4.0 @@ -10830,27 +10287,11 @@ snapshots: transitivePeerDependencies: - supports-color - w3c-xmlserializer@5.0.0: - dependencies: - xml-name-validator: 5.0.0 - web-namespaces@2.0.1: {} webidl-conversions@7.0.0: {} - whatwg-encoding@3.1.1: - dependencies: - iconv-lite: 0.6.3 - - whatwg-mimetype@3.0.0: - optional: true - - whatwg-mimetype@4.0.0: {} - - whatwg-url@14.1.0: - dependencies: - tr46: 5.0.0 - webidl-conversions: 7.0.0 + whatwg-mimetype@3.0.0: {} which-boxed-primitive@1.1.1: dependencies: @@ -10902,11 +10343,6 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.3.0: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 - widest-line@4.0.1: dependencies: string-width: 5.1.2 @@ -10937,14 +10373,8 @@ snapshots: wrappy@1.0.2: {} - ws@8.18.0: {} - xml-name-validator@4.0.0: {} - xml-name-validator@5.0.0: {} - - xmlchars@2.2.0: {} - xxhash-wasm@1.1.0: {} yallist@3.1.1: {} diff --git a/src/classes/emulator-file-system.ts b/src/classes/emulator-file-system.ts index 9ddc532..49cbeaa 100644 --- a/src/classes/emulator-file-system.ts +++ b/src/classes/emulator-file-system.ts @@ -1,5 +1,5 @@ -import { blobToBuffer, checkIsAborted, delay, textEncoder } from '../libs/utils' -import { vendors } from '../libs/vendors' +import { blobToBuffer, checkIsAborted, delay, textEncoder } from '../libs/utils.ts' +import { vendors } from '../libs/vendors.ts' import type { RetroArchEmscriptenModule } from '../types/retroarch-emscripten' const { ini, path } = vendors @@ -83,7 +83,7 @@ export class EmulatorFileSystem { async waitForFile(fileName: string) { const maxRetries = 30 - let buffer + let buffer: Uint8Array | undefined let isFinished = false let retryTimes = 0 while (retryTimes <= maxRetries && !isFinished) { @@ -92,7 +92,9 @@ export class EmulatorFileSystem { checkIsAborted(this.signal) try { const newBuffer = this.readFile(fileName, 'binary').buffer - isFinished = buffer?.byteLength > 0 && buffer?.byteLength === newBuffer.byteLength + if (buffer) { + isFinished = buffer.byteLength > 0 && buffer.byteLength === newBuffer.byteLength + } buffer = newBuffer } catch (error) { console.warn(error) @@ -125,7 +127,9 @@ export class EmulatorFileSystem { const clonedConfig: typeof config = {} for (const key in config) { - clonedConfig[key] = `__${config[key]}__` + if (Object.hasOwn(config, key)) { + clonedConfig[key] = `__${config[key]}__` + } } const fileContent = ini.stringify(clonedConfig, { platform: 'linux', whitespace: true }).replaceAll('__', '"') await this.writeFile(path, fileContent) diff --git a/src/classes/emulator-options.ts b/src/classes/emulator-options.ts index 30f062a..6809c00 100644 --- a/src/classes/emulator-options.ts +++ b/src/classes/emulator-options.ts @@ -1,11 +1,11 @@ -import { getGlobalOptions } from '../libs/options.js' -import { merge, urlBaseName } from '../libs/utils.js' +import { getGlobalOptions } from '../libs/options.ts' +import { merge, urlBaseName } from '../libs/utils.ts' import type { NostalgistOptions, NostalgistOptionsFile, NostalgistResolveFileFunction, -} from '../types/nostalgist-options.js' -import type { RetroArchEmscriptenModuleOptions } from '../types/retroarch-emscripten' +} from '../types/nostalgist-options.ts' +import type { RetroArchEmscriptenModuleOptions } from '../types/retroarch-emscripten.ts' export class EmulatorOptions { beforeLaunch?: (() => Promise | void) | undefined diff --git a/src/classes/emulator.ts b/src/classes/emulator.ts index ba5998d..64b9cad 100644 --- a/src/classes/emulator.ts +++ b/src/classes/emulator.ts @@ -1,6 +1,6 @@ -import { coreInfoMap } from '../constants/core-info' -import { keyboardCodeMap } from '../constants/keyboard-code-map' -import { getEmscriptenModuleOverrides } from '../libs/emscripten' +import { coreInfoMap } from '../constants/core-info.ts' +import { keyboardCodeMap } from '../constants/keyboard-code-map.ts' +import { getEmscriptenModuleOverrides } from '../libs/emscripten.ts' import { blobToBuffer, checkIsAborted, @@ -9,11 +9,11 @@ import { padZero, textEncoder, updateStyle, -} from '../libs/utils' -import { vendors } from '../libs/vendors' -import type { RetroArchCommand } from '../types/retroarch-command' +} from '../libs/utils.ts' +import { vendors } from '../libs/vendors.ts' +import type { RetroArchCommand } from '../types/retroarch-command.ts' import type { RetroArchEmscriptenModule } from '../types/retroarch-emscripten' -import { EmulatorFileSystem } from './emulator-file-system' +import { EmulatorFileSystem } from './emulator-file-system.ts' import type { EmulatorOptions } from './emulator-options' const { ini, path } = vendors diff --git a/src/classes/nostalgist.ts b/src/classes/nostalgist.ts index b75a789..8e3d081 100644 --- a/src/classes/nostalgist.ts +++ b/src/classes/nostalgist.ts @@ -1,8 +1,7 @@ -import { Emulator } from '../classes/emulator' -import { systemCoreMap } from '../constants/system' -import { getGlobalOptions, resetGlobalOptions, updateGlobalOptions } from '../libs/options' -import { checkIsAborted, merge } from '../libs/utils' -import { vendors } from '../libs/vendors' +import { systemCoreMap } from '../constants/system.ts' +import { getGlobalOptions, resetGlobalOptions, updateGlobalOptions } from '../libs/options.ts' +import { checkIsAborted, merge } from '../libs/utils.ts' +import { vendors } from '../libs/vendors.ts' import type { NostalgistLaunchOptions, NostalgistLaunchRomOptions, @@ -11,7 +10,8 @@ import type { NostalgistOptionsPartial, } from '../types/nostalgist-options' import type { RetroArchCommand } from '../types/retroarch-command' -import { EmulatorOptions } from './emulator-options' +import { EmulatorOptions } from './emulator-options.ts' +import { Emulator } from './emulator.ts' export class Nostalgist { static readonly Nostalgist = Nostalgist diff --git a/src/index-umd.ts b/src/index-umd.ts index 7c633d8..051d567 100644 --- a/src/index-umd.ts +++ b/src/index-umd.ts @@ -1 +1 @@ -export { Nostalgist as default } from './classes/nostalgist' +export { Nostalgist as default } from './classes/nostalgist.ts' diff --git a/src/index.ts b/src/index.ts index 8306ed7..6ba839f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1 @@ -export { Nostalgist } from './classes/nostalgist' +export { Nostalgist } from './classes/nostalgist.ts' diff --git a/src/libs/emscripten.ts b/src/libs/emscripten.ts index 9c84bcf..be4d00b 100644 --- a/src/libs/emscripten.ts +++ b/src/libs/emscripten.ts @@ -1,4 +1,4 @@ -import type { RetroArchEmscriptenModuleOptions } from '../types/retroarch-emscripten' +import type { RetroArchEmscriptenModuleOptions } from '../types/retroarch-emscripten.ts' export function getEmscriptenModuleOverrides(overrides: RetroArchEmscriptenModuleOptions) { let resolveRunDependenciesPromise: () => void diff --git a/src/libs/options.ts b/src/libs/options.ts index 3b23c7e..fcee552 100644 --- a/src/libs/options.ts +++ b/src/libs/options.ts @@ -1,7 +1,7 @@ -import type { NostalgistOptions, NostalgistOptionsPartial } from '../types/nostalgist-options' +import type { NostalgistOptions, NostalgistOptionsPartial } from '../types/nostalgist-options.ts' import type { RetroArchConfig } from '../types/retroarch-config' -import { isAbsoluteUrl, merge } from './utils' -import { vendors } from './vendors' +import { isAbsoluteUrl, merge } from './utils.ts' +import { vendors } from './vendors.ts' const { path } = vendors diff --git a/src/libs/utils.ts b/src/libs/utils.ts index 8632b10..1b73e19 100644 --- a/src/libs/utils.ts +++ b/src/libs/utils.ts @@ -1,4 +1,4 @@ -import { vendors } from './vendors' +import { vendors } from './vendors.ts' const { path } = vendors diff --git a/tests/e2e/playwright.config.ts b/tests/e2e/playwright.config.ts index b53d726..6ef52aa 100644 --- a/tests/e2e/playwright.config.ts +++ b/tests/e2e/playwright.config.ts @@ -10,6 +10,6 @@ export default defineConfig({ snapshotPathTemplate: '{testDir}/snapshots/{testFilePath}/{testName}/{arg}{ext}', testMatch: 'tests/e2e/**/*.spec.ts', updateSnapshots: 'missing', - use: { baseURL: 'http://localhost:3000/', headless: true }, - webServer: { command: 'pnpm serve -n', port: 3000, reuseExistingServer: !isCi }, + use: { baseURL: 'http://localhost:8000/', headless: true }, + webServer: { command: 'python3 -m http.server', cwd: '../..', port: 8000, reuseExistingServer: !isCi }, }) diff --git a/tests/integration/nostalgist.spec.ts b/tests/integration/nostalgist.spec.ts index 959cd53..c1f8322 100644 --- a/tests/integration/nostalgist.spec.ts +++ b/tests/integration/nostalgist.spec.ts @@ -1,5 +1,6 @@ -import { afterEach, beforeEach, describe, expect, test } from 'vitest' -import { Nostalgist } from '../../src' +import { afterEach, beforeEach, describe, test, type TestContext } from 'node:test' +import { GlobalRegistrator } from '@happy-dom/global-registrator' +import { Nostalgist } from '../../src/index.ts' const testNesRomUrl = 'https://buildbot.libretro.com/assets/cores/Nintendo%20-%20Nintendo%20Entertainment%20System/Super%20Tilt%20Bro%20%28USA%29.nes' @@ -12,6 +13,8 @@ function resolveBios(bios: any) { return `https://buildbot.libretro.com/assets/system/${encodeURIComponent(bios)}` } +GlobalRegistrator.register({ settings: { fetch: { disableSameOriginPolicy: true } } }) + describe('nostalgist', () => { beforeEach(() => { Nostalgist.configure({ runEmulatorManually: true }) @@ -21,67 +24,67 @@ describe('nostalgist', () => { Nostalgist.resetToDefault() }) - test('Nostalgist.nes', async () => { + test('Nostalgist.nes', async (t: TestContext) => { const nostalgist = await Nostalgist.nes('flappybird.nes') const options = nostalgist.getOptions() - expect(options.core).toBe('fceumm') + t.assert.strictEqual(options.core, 'fceumm') const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('fceumm') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('flappybird.nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.strictEqual(emulatorOptions.core.name, 'fceumm') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.strictEqual(emulatorOptions.rom[0].fileName, 'flappybird.nes') + t.assert.ok(emulatorOptions.rom[0].fileContent instanceof Blob) + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.nes with custom resolveRom', async () => { + test('Nostalgist.nes with custom resolveRom', async (t: TestContext) => { const nostalgist = await Nostalgist.nes({ resolveRom, rom: 'Super Tilt Bro (USA).nes' }) const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('fceumm') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.strictEqual(emulatorOptions.core.name, 'fceumm') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.configure with global custom resolveRom', async () => { + test('Nostalgist.configure with global custom resolveRom', async (t: TestContext) => { Nostalgist.configure({ resolveRom }) const nostalgist = await Nostalgist.nes('Super Tilt Bro (USA).nes') const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('fceumm') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.strictEqual(emulatorOptions.core.name, 'fceumm') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.launch with custom core', async () => { + test('Nostalgist.launch with custom core', async (t: TestContext) => { const nostalgist = await Nostalgist.launch({ core: 'nestopia', rom: testNesRomUrl }) const options = nostalgist.getOptions() - expect(options.core).toBe('nestopia') + t.assert.strictEqual(options.core, 'nestopia') const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('nestopia') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.strictEqual(emulatorOptions.core.name, 'nestopia') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.launch with custom size', async () => { + test('Nostalgist.launch with custom size', async (t: TestContext) => { const nostalgist = await Nostalgist.launch({ core: 'nestopia', rom: testNesRomUrl, @@ -92,19 +95,19 @@ describe('nostalgist', () => { }) const options = nostalgist.getOptions() - expect(options.core).toBe('nestopia') + t.assert.strictEqual(options.core, 'nestopia') const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.size).toEqual({ height: 100, width: 100 }) - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.deepStrictEqual(emulatorOptions.size, { height: 100, width: 100 }) + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.launch with custom emscripten core', async () => { + test('Nostalgist.launch with custom emscripten core', async (t: TestContext) => { const core = { js: 'https://web.libretro.com/fceumm_libretro.js', name: 'fceumm', @@ -113,19 +116,19 @@ describe('nostalgist', () => { const nostalgist = await Nostalgist.launch({ core, rom: testNesRomUrl }) const options = nostalgist.getOptions() - expect(options.core).toStrictEqual(core) + t.assert.strictEqual(options.core, core) const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('fceumm') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.strictEqual(emulatorOptions.core.name, 'fceumm') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.launch with custom rom and custom emscripten core', async () => { + test('Nostalgist.launch with custom rom and custom emscripten core', async (t: TestContext) => { const core = { js: 'https://web.libretro.com/fceumm_libretro.js', name: 'fceumm', @@ -136,19 +139,19 @@ describe('nostalgist', () => { const nostalgist = await Nostalgist.launch({ core, resolveRom, rom }) const options = nostalgist.getOptions() - expect(options.core).toStrictEqual(core) + t.assert.strictEqual(options.core, core) const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('fceumm') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(1) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toEqual([]) + t.assert.strictEqual(emulatorOptions.core.name, 'fceumm') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 1) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios, []) }) - test('Nostalgist.launch with multiple files and bios', async () => { + test('Nostalgist.launch with multiple files and bios', async (t: TestContext) => { const core = { js: 'https://web.libretro.com/fceumm_libretro.js', name: 'fceumm', @@ -160,25 +163,25 @@ describe('nostalgist', () => { const nostalgist = await Nostalgist.launch({ bios, core, resolveBios, resolveRom, rom }) const options = nostalgist.getOptions() - expect(options.core).toStrictEqual(core) + t.assert.strictEqual(options.core, core) const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.core.name).toBe('fceumm') - expect(emulatorOptions.core.js).toBeTypeOf('string') - expect(emulatorOptions.core.wasm).toBeInstanceOf(ArrayBuffer) - expect(emulatorOptions.rom).toHaveLength(2) - expect(emulatorOptions.rom[0].fileName).toEqual('Super Tilt Bro (USA).nes') - expect(emulatorOptions.rom[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.rom[1].fileName).toEqual('240p Test Suite.nes') - expect(emulatorOptions.rom[1].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios).toHaveLength(2) - expect(emulatorOptions.bios[0].fileName).toEqual('PrBoom.zip') - expect(emulatorOptions.bios[0].fileContent.constructor.name).toBe('Blob') - expect(emulatorOptions.bios[1].fileName).toEqual('FinalBurn Neo (hiscore).zip') - expect(emulatorOptions.bios[1].fileContent.constructor.name).toBe('Blob') + t.assert.strictEqual(emulatorOptions.core.name, 'fceumm') + t.assert.strictEqual(typeof emulatorOptions.core.js, 'string') + t.assert.ok(emulatorOptions.core.wasm instanceof ArrayBuffer) + t.assert.strictEqual(emulatorOptions.rom.length, 2) + t.assert.deepStrictEqual(emulatorOptions.rom[0].fileName, 'Super Tilt Bro (USA).nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.rom[1].fileName, '240p Test Suite.nes') + t.assert.strictEqual(emulatorOptions.rom[1].fileContent.constructor.name, 'Blob') + t.assert.strictEqual(emulatorOptions.bios.length, 2) + t.assert.deepStrictEqual(emulatorOptions.bios[0].fileName, 'PrBoom.zip') + t.assert.strictEqual(emulatorOptions.bios[0].fileContent.constructor.name, 'Blob') + t.assert.deepStrictEqual(emulatorOptions.bios[1].fileName, 'FinalBurn Neo (hiscore).zip') + t.assert.strictEqual(emulatorOptions.bios[1].fileContent.constructor.name, 'Blob') }) - test('Nostalgist.launch with custom style and size', async () => { + test('Nostalgist.launch with custom style and size', async (t: TestContext) => { const nostalgist = await Nostalgist.launch({ core: 'fceumm', rom: 'flappybird.nes', @@ -186,10 +189,10 @@ describe('nostalgist', () => { }) const options = nostalgist.getOptions() - expect(options.size).toEqual({ height: 100, width: 100 }) + t.assert.deepStrictEqual(options.size, { height: 100, width: 100 }) }) - test('Nostalgist.launch with shaders', async () => { + test('Nostalgist.launch with shaders', async (t: TestContext) => { const nostalgist = await Nostalgist.launch({ core: 'fceumm', rom: 'flappybird.nes', @@ -197,14 +200,15 @@ describe('nostalgist', () => { }) const { shader } = nostalgist.getEmulatorOptions() + t.assert.ok(shader[0].fileName.endsWith('.glslp')) + t.assert.ok(shader[1].fileName.endsWith('.glsl')) for (const file of shader) { - expect(file.fileName).toContain('.glsl') - expect(file.fileContent.type).toBe('application/octet-stream') - expect(file.fileContent.size).toBeGreaterThan(0) + t.assert.strictEqual(file.fileContent.type, 'application/octet-stream') + t.assert.ok(file.fileContent.size > 0) } }) - test('Nostalgist.launch with nested options', async () => { + test('Nostalgist.launch with nested options', async (t: TestContext) => { Nostalgist.configure({ retroarchConfig: { input_audio_mute: 'a', @@ -222,7 +226,8 @@ describe('nostalgist', () => { }) const options = nostalgist.getOptions() - expect(options.retroarchConfig).toMatchObject({ + // @ts-expect-error this method is still not typed. see https://nodejs.org/api/assert.html#assertpartialdeepstrictequalactual-expected-message + t.assert.partialDeepStrictEqual(options.retroarchConfig, { input_audio_mute: 'b', input_max_users: 4, input_menu_toggle: 'nul', @@ -230,7 +235,7 @@ describe('nostalgist', () => { }) }) - test('Nostalgist.launch overwrites the configured core', async () => { + test('Nostalgist.launch overwrites the configured core', async (t: TestContext) => { Nostalgist.configure({ core: 'nestopia' }) const core = { js: 'https://web.libretro.com/fceumm_libretro.js', @@ -240,10 +245,10 @@ describe('nostalgist', () => { const nostalgist = await Nostalgist.launch({ core, rom: testNesRomUrl }) const options = nostalgist.getOptions() - expect(options.core).toStrictEqual(core) + t.assert.strictEqual(options.core, core) }) - test('Nostalgist.launch overwrites the configured custom emscripten core', async () => { + test('Nostalgist.launch overwrites the configured custom emscripten core', async (t: TestContext) => { const core = { js: 'https://web.libretro.com/fceumm_libretro.js', name: 'fceumm', @@ -253,21 +258,21 @@ describe('nostalgist', () => { const nostalgist = await Nostalgist.launch({ core: 'nestopia', rom: testNesRomUrl }) const options = nostalgist.getOptions() - expect(options.core).toStrictEqual('nestopia') + t.assert.strictEqual(options.core, 'nestopia') }) - test('Nostalgist.launch with a custom element', async () => { + test('Nostalgist.launch with a custom element', async (t: TestContext) => { const element = document.createElement('canvas') const nostalgist = await Nostalgist.launch({ core: 'nestopia', element, rom: 'flappybird.nes' }) const options = nostalgist.getOptions() - expect(options.core).toStrictEqual('nestopia') + t.assert.strictEqual(options.core, 'nestopia') }) - test('Nostalgist.launch with a malformed url', async () => { + test('Nostalgist.launch with a malformed url', async (t: TestContext) => { const nostalgist = await Nostalgist.nes({ rom: 'http://example.com/a%b%c.nes?xxx=1' }) const emulatorOptions = nostalgist.getEmulatorOptions() - expect(emulatorOptions.rom[0].fileName).toStrictEqual('a-b-c.nes') + t.assert.strictEqual(emulatorOptions.rom[0].fileName, 'a-b-c.nes') }) }) diff --git a/tests/integration/vitest.config.ts b/tests/integration/vitest.config.ts deleted file mode 100644 index b546653..0000000 --- a/tests/integration/vitest.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - test: { - environment: 'jsdom', - include: ['tests/integration/**/*.spec.ts'], - testTimeout: 30_000, - }, -})