chore: migrate to nuxt-vitest

This commit is contained in:
Anthony Fu 2023-01-29 14:20:37 +01:00
parent b48b7f4c16
commit 6dbf7ae74f
12 changed files with 619 additions and 102 deletions

View file

@ -25,6 +25,7 @@ export default defineNuxtConfig({
'@vue-macros/nuxt',
'@nuxtjs/i18n',
'@nuxtjs/color-mode',
'nuxt-vitest',
...(isDevelopment || isWindows) ? [] : ['nuxt-security'],
'~/modules/purge-comments',
'~/modules/setup-components',
@ -66,6 +67,7 @@ export default defineNuxtConfig({
'./composables/settings',
'./composables/tiptap/index.ts',
],
injectAtEnd: true,
},
vite: {
define: {

View file

@ -103,6 +103,7 @@
"lint-staged": "^13.1.0",
"nuxt": "3.0.0",
"nuxt-security": "^0.10.1",
"nuxt-vitest": "^0.6.4",
"postcss-nested": "^6.0.0",
"prettier": "^2.8.3",
"rollup-plugin-node-polyfills": "^0.2.1",
@ -112,12 +113,12 @@
"std-env": "^3.3.1",
"theme-vitesse": "^0.6.0",
"typescript": "^4.9.4",
"unplugin-auto-import": "^0.12.1",
"unimport": "^2.1.0",
"unplugin-auto-import": "^0.13.0",
"unplugin-vue-inspector": "^0.0.2",
"vite-plugin-inspect": "^0.7.14",
"vite-plugin-pwa": "^0.14.1",
"vitest": "^0.28.1",
"vitest-environment-nuxt": "0.4.0",
"vue-tsc": "^1.0.24",
"workbox-build": "^6.5.4",
"workbox-window": "^6.5.4"

View file

@ -91,6 +91,7 @@ importers:
masto: ^5.6.1
nuxt: 3.0.0
nuxt-security: ^0.10.1
nuxt-vitest: ^0.6.4
pinia: ^2.0.29
postcss-nested: ^6.0.0
prettier: ^2.8.3
@ -111,12 +112,12 @@ importers:
typescript: ^4.9.4
ufo: ^1.0.1
ultrahtml: ^1.2.0
unplugin-auto-import: ^0.12.1
unimport: ^2.1.0
unplugin-auto-import: ^0.13.0
unplugin-vue-inspector: ^0.0.2
vite-plugin-inspect: ^0.7.14
vite-plugin-pwa: ^0.14.1
vitest: ^0.28.1
vitest-environment-nuxt: 0.4.0
vue-advanced-cropper: ^2.8.8
vue-tsc: ^1.0.24
vue-virtual-scroller: 2.0.0-beta.7
@ -199,6 +200,7 @@ importers:
lint-staged: 13.1.0
nuxt: 3.0.0_no2el4fe4ggitllzolcgczmlgq
nuxt-security: 0.10.1
nuxt-vitest: 0.6.4_jsdom@21.1.0
postcss-nested: 6.0.0
prettier: 2.8.3
rollup-plugin-node-polyfills: 0.2.1
@ -208,12 +210,12 @@ importers:
std-env: 3.3.1
theme-vitesse: 0.6.0
typescript: 4.9.4
unplugin-auto-import: 0.12.1_@vueuse+core@9.11.1
unimport: 2.1.0
unplugin-auto-import: 0.13.0_@vueuse+core@9.11.1
unplugin-vue-inspector: 0.0.2
vite-plugin-inspect: 0.7.14
vite-plugin-pwa: 0.14.1
vitest: 0.28.1_jsdom@21.1.0
vitest-environment-nuxt: 0.4.0_vitest@0.28.1
vite-plugin-pwa: 0.14.1_tz3vz2xt4jvid2diblkpydcyn4
vitest: 0.28.3_jsdom@21.1.0
vue-tsc: 1.0.24_typescript@4.9.4
workbox-build: 6.5.4
workbox-window: 6.5.4
@ -2586,7 +2588,7 @@ packages:
scule: 1.0.0
semver: 7.3.8
unctx: 2.1.1
unimport: 2.0.1
unimport: 2.1.0
untyped: 1.2.2
transitivePeerDependencies:
- rollup
@ -2613,7 +2615,34 @@ packages:
scule: 1.0.0
semver: 7.3.8
unctx: 2.1.1
unimport: 2.0.1_rollup@3.10.1
unimport: 2.1.0_rollup@3.10.1
untyped: 1.2.2
transitivePeerDependencies:
- rollup
- supports-color
dev: true
/@nuxt/kit/3.1.1:
resolution: {integrity: sha512-wmqVCIuD/te6BKf3YiqWyMumKI5JIpkiv0li/1Y3QHnTkoxyIhLkbFgNcQHuBxJ3eMlk2UjAjAqWiqBHTX54vQ==}
engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0}
dependencies:
'@nuxt/schema': 3.1.1
c12: 1.1.0
consola: 2.15.3
defu: 6.1.2
globby: 13.1.3
hash-sum: 2.0.0
ignore: 5.2.4
jiti: 1.16.2
knitwork: 1.0.0
lodash.template: 4.5.0
mlly: 1.1.0
pathe: 1.1.0
pkg-types: 1.0.1
scule: 1.0.0
semver: 7.3.8
unctx: 2.1.1
unimport: 2.1.0
untyped: 1.2.2
transitivePeerDependencies:
- rollup
@ -2677,7 +2706,7 @@ packages:
scule: 1.0.0
std-env: 3.3.1
ufo: 1.0.1
unimport: 2.0.1
unimport: 2.1.0
untyped: 1.2.2
transitivePeerDependencies:
- rollup
@ -2699,7 +2728,29 @@ packages:
scule: 1.0.0
std-env: 3.3.1
ufo: 1.0.1
unimport: 2.0.1_rollup@3.10.1
unimport: 2.1.0_rollup@3.10.1
untyped: 1.2.2
transitivePeerDependencies:
- rollup
- supports-color
dev: true
/@nuxt/schema/3.1.1:
resolution: {integrity: sha512-/KuoCDVGrLD9W7vwuYhu4HbdT/BpbrhA4Pm9dGn7Jah40kHDGqUnJxugvMjt+4suq53rLQyTA0LRDWfFxfxAOQ==}
engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0}
dependencies:
c12: 1.1.0
create-require: 1.1.1
defu: 6.1.2
hookable: 5.4.2
jiti: 1.16.2
pathe: 1.1.0
pkg-types: 1.0.1
postcss-import-resolver: 2.0.0
scule: 1.0.0
std-env: 3.3.1
ufo: 1.0.1
unimport: 2.1.0
untyped: 1.2.2
transitivePeerDependencies:
- rollup
@ -2710,7 +2761,7 @@ packages:
resolution: {integrity: sha512-mUyDqmB8GUJwTHVnwxuapeUHDSsUycOt+ZsA7GB6F8MOBJiVhQl/EeEAWoO2TUs0BPp2SlY9uO6eQihvxyLRqQ==}
hasBin: true
dependencies:
'@nuxt/kit': 3.1.0
'@nuxt/kit': 3.1.1
chalk: 5.2.0
ci-info: 3.7.1
consola: 2.15.3
@ -2759,7 +2810,7 @@ packages:
externality: 1.0.0
fs-extra: 10.1.0
get-port-please: 2.6.1
h3: 1.0.2
h3: 1.1.0
knitwork: 1.0.0
magic-string: 0.26.7
mlly: 1.1.0
@ -2817,7 +2868,7 @@ packages:
externality: 1.0.0
fs-extra: 11.1.0
get-port-please: 3.0.1
h3: 1.0.2
h3: 1.1.0
knitwork: 1.0.0
magic-string: 0.27.0
mlly: 1.1.0
@ -2858,8 +2909,8 @@ packages:
/@nuxthq/studio/0.6.5:
resolution: {integrity: sha512-kGb8abgTRJi0gcvTQcawEol5CR6uXS4bpCwEEk0+b3LSvyiM6k22Opb29KkSatprTkFrAPHDKSaUve8PiX22sw==}
dependencies:
'@nuxt/kit': 3.1.0
'@nuxt/schema': 3.0.0
'@nuxt/kit': 3.1.1
'@nuxt/schema': 3.1.1
defu: 6.1.2
nuxt-component-meta: 0.4.3
nuxt-config-schema: 0.4.4
@ -2875,7 +2926,7 @@ packages:
/@nuxtjs/color-mode/3.2.0:
resolution: {integrity: sha512-isDR01yfadopiHQ/VEVUpyNSPrk5PCjUHS4t1qYRZwuRGefU4s9Iaxf6H9nmr1QFzoMgTm+3T0r/54jLwtpZbA==}
dependencies:
'@nuxt/kit': 3.0.0
'@nuxt/kit': 3.1.1
lodash.template: 4.5.0
pathe: 1.1.0
transitivePeerDependencies:
@ -2890,7 +2941,7 @@ packages:
'@intlify/bundle-utils': 3.4.0_vue-i18n@9.3.0-beta.16
'@intlify/shared': 9.3.0-beta.11
'@intlify/unplugin-vue-i18n': 0.8.1_vue-i18n@9.3.0-beta.16
'@nuxt/kit': 3.1.0
'@nuxt/kit': 3.1.1
'@vue/compiler-sfc': 3.2.45
cookie-es: 0.5.0
debug: 4.3.4
@ -2919,7 +2970,7 @@ packages:
/@pinia/nuxt/0.4.6_typescript@4.9.4:
resolution: {integrity: sha512-HjrYEfLdFpmsjhicPJgL36jVhzHWukIQPFFHGTSF84Cplu+f2nY2XHKqe9ToHzE9rLee2RjLOwAzOnXa/I/u6A==}
dependencies:
'@nuxt/kit': 3.0.0
'@nuxt/kit': 3.1.1
pinia: 2.0.29_typescript@4.9.4
transitivePeerDependencies:
- '@vue/composition-api'
@ -3922,7 +3973,7 @@ packages:
/@unocss/nuxt/0.48.5:
resolution: {integrity: sha512-I5djnTENsxlyxaAagoOqgajz1HqzkeIPQXj2nyq1oTG94rWLpHMY+IX6LMyGl82Csj6Q/myijBDm538JR5Dnsg==}
dependencies:
'@nuxt/kit': 3.0.0
'@nuxt/kit': 3.1.1
'@unocss/config': 0.48.5
'@unocss/core': 0.48.5
'@unocss/preset-attributify': 0.48.5
@ -4144,30 +4195,40 @@ packages:
vue: 3.2.45
dev: true
/@vitest/expect/0.28.1:
resolution: {integrity: sha512-BOvWjBoocKrrTTTC0opIvzOEa7WR/Ovx4++QYlbjYKjnQJfWRSEQkTpAIEfOURtZ/ICcaLk5jvsRshXvjarZew==}
/@vitest/expect/0.28.3:
resolution: {integrity: sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==}
dependencies:
'@vitest/spy': 0.28.1
'@vitest/utils': 0.28.1
'@vitest/spy': 0.28.3
'@vitest/utils': 0.28.3
chai: 4.3.7
dev: true
/@vitest/runner/0.28.1:
resolution: {integrity: sha512-kOdmgiNe+mAxZhvj2eUTqKnjfvzzknmrcS+SZXV7j6VgJuWPFAMCv3TWOe03nF9dkqDfVLCDRw/hwFuCzmzlQg==}
/@vitest/runner/0.28.3:
resolution: {integrity: sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==}
dependencies:
'@vitest/utils': 0.28.1
'@vitest/utils': 0.28.3
p-limit: 4.0.0
pathe: 1.1.0
dev: true
/@vitest/spy/0.28.1:
resolution: {integrity: sha512-XGlD78cG3IxXNnGwEF121l0MfTNlHSdI25gS2ik0z6f/D9wWUOru849QkJbuNl4CMlZCtNkx3b5IS6MRwKGKuA==}
/@vitest/spy/0.28.3:
resolution: {integrity: sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==}
dependencies:
tinyspy: 1.0.2
dev: true
/@vitest/utils/0.28.1:
resolution: {integrity: sha512-a7cV1fs5MeU+W+8sn8gM9gV+q7V/wYz3/4y016w/icyJEKm9AMdSHnrzxTWaElJ07X40pwU6m5353Jlw6Rbd8w==}
/@vitest/ui/0.28.3:
resolution: {integrity: sha512-pbr9VySq2PJhaQP06Fq9c6Ra1wSUY1gnNEVhuwVU1yhqz78WdsO3rqREu7GSqEpAr6oZfwpBOUVzW87C2lNGYw==}
dependencies:
fast-glob: 3.2.12
flatted: 3.2.7
pathe: 1.1.0
picocolors: 1.0.0
sirv: 2.0.2
dev: true
/@vitest/utils/0.28.3:
resolution: {integrity: sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==}
dependencies:
cli-truncate: 3.1.0
diff: 5.1.0
@ -4355,7 +4416,7 @@ packages:
peerDependencies:
nuxt: ^3.0.0
dependencies:
'@nuxt/kit': 3.1.0
'@nuxt/kit': 3.1.1
'@vue-macros/short-vmodel': 1.0.5
'@vue-macros/volar': 0.6.2_vue-tsc@1.0.24
nuxt: 3.0.0_no2el4fe4ggitllzolcgczmlgq
@ -4570,10 +4631,13 @@ packages:
resolution: {integrity: sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==}
dev: true
/@vue/test-utils/2.2.7:
resolution: {integrity: sha512-BMuoruUFTEqhLoOgsMcgNVMiByYbfHCKGr2C4CPdGtz/affUtDVX5zr1RnPuq0tYSiaqq+Enw5voUpG6JY8Q7g==}
/@vue/test-utils/2.2.8:
resolution: {integrity: sha512-/R8DKzp41Ip/RqTt1jvOVi5gxby3EwNWiYHNYsG9FAjEvt0gzDvYN55lCKzX7IdnI5zVIOo5tHtts0SLT+JrWw==}
peerDependencies:
'@vue/compiler-dom': ^3.0.1
vue: ^3.0.1
dependencies:
js-beautify: 1.14.6
dev: true
/@vueuse/core/8.9.4:
@ -4719,7 +4783,7 @@ packages:
peerDependencies:
nuxt: ^3.0.0
dependencies:
'@nuxt/kit': 3.0.0
'@nuxt/kit': 3.1.1
'@vueuse/core': 9.11.1
'@vueuse/metadata': 9.11.1
local-pkg: 0.4.3
@ -4737,7 +4801,7 @@ packages:
peerDependencies:
nuxt: ^3.0.0
dependencies:
'@nuxt/kit': 3.0.0
'@nuxt/kit': 3.1.1
'@vueuse/core': 9.11.1
'@vueuse/metadata': 9.11.1
local-pkg: 0.4.3
@ -5631,6 +5695,13 @@ packages:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true
/config-chain/1.1.13:
resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==}
dependencies:
ini: 1.3.8
proto-list: 1.2.4
dev: true
/consola/2.15.3:
resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==}
@ -6107,6 +6178,16 @@ packages:
resolution: {integrity: sha512-GJRqdiy2h+EXy6a8E6R+ubmqUM08BK0FWNq41k24fup6045biQ8NXxoXimiwegMQvFFV3t1emADdGNL1TlS61A==}
dev: false
/editorconfig/0.15.3:
resolution: {integrity: sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==}
hasBin: true
dependencies:
commander: 2.20.3
lru-cache: 4.1.5
semver: 5.7.1
sigmund: 1.0.1
dev: true
/ee-first/1.1.1:
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
dev: true
@ -7534,8 +7615,8 @@ packages:
duplexer: 0.1.2
dev: true
/h3/1.0.2:
resolution: {integrity: sha512-25QqjQMz8pX1NI2rZ/ziNT9B8Aog7jmu2a0o8Qm9kKoH3zOhE+2icVs069h6DEp0g1Dst1+zKfRdRYcK0MogJA==}
/h3/1.1.0:
resolution: {integrity: sha512-kx3u+RMzY963fU8NNT2ePWgsryAn9DNztPqbHia/M7HgA+rtXKjHjED9/uidcYPmImNwAfJsCachCzh2T3QH2A==}
dependencies:
cookie-es: 0.5.0
destr: 1.2.2
@ -7543,8 +7624,8 @@ packages:
ufo: 1.0.1
dev: true
/happy-dom/8.1.5:
resolution: {integrity: sha512-/UXAJ2fHTs4H3vy7TS7c9PKFvPyaNialk2Er9NdXfpBKNaCITMOH03rkjHXp5jnJnSmRBa+av8E08PUAaIB1jQ==}
/happy-dom/8.2.0:
resolution: {integrity: sha512-SBMi/ht8zvtXNuSVpXJu+hOEJtNEbM4CxQukcHMm7FCd1sMuitfESwUMX83gl3C2JcEGLcpx/+JnF+rjGl27+A==}
dependencies:
css.escape: 1.5.1
he: 1.2.0
@ -8256,6 +8337,17 @@ packages:
hasBin: true
dev: true
/js-beautify/1.14.6:
resolution: {integrity: sha512-GfofQY5zDp+cuHc+gsEXKPpNw2KbPddreEo35O6jT6i0RVK6LhsoYBhq5TvK4/n74wnA0QbK8gGd+jUZwTMKJw==}
engines: {node: '>=10'}
hasBin: true
dependencies:
config-chain: 1.1.13
editorconfig: 0.15.3
glob: 8.1.0
nopt: 6.0.0
dev: true
/js-cookie/3.0.1:
resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==}
engines: {node: '>=12'}
@ -8653,6 +8745,13 @@ packages:
dependencies:
tslib: 2.4.1
/lru-cache/4.1.5:
resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==}
dependencies:
pseudomap: 1.0.2
yallist: 2.1.2
dev: true
/lru-cache/5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
dependencies:
@ -9392,7 +9491,7 @@ packages:
fs-extra: 10.1.0
globby: 13.1.3
gzip-size: 7.0.0
h3: 1.0.2
h3: 1.1.0
hookable: 5.4.2
http-proxy: 1.18.1
is-primitive: 3.0.1
@ -9421,7 +9520,7 @@ packages:
source-map-support: 0.5.21
std-env: 3.3.1
ufo: 1.0.1
unenv: 1.0.1
unenv: 1.0.2
unimport: 1.3.0_rollup@2.79.1
unstorage: 1.0.1
transitivePeerDependencies:
@ -9464,7 +9563,7 @@ packages:
fs-extra: 11.1.0
globby: 13.1.3
gzip-size: 7.0.0
h3: 1.0.2
h3: 1.1.0
hookable: 5.4.2
http-proxy: 1.18.1
is-primitive: 3.0.1
@ -9492,7 +9591,7 @@ packages:
source-map-support: 0.5.21
std-env: 3.3.1
ufo: 1.0.1
unenv: 1.0.1
unenv: 1.0.2
unimport: 1.3.0_rollup@3.10.1
unstorage: 1.0.1
transitivePeerDependencies:
@ -9570,6 +9669,14 @@ packages:
abbrev: 1.1.1
dev: true
/nopt/6.0.0:
resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==}
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
hasBin: true
dependencies:
abbrev: 1.1.1
dev: true
/normalize-package-data/2.5.0:
resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
dependencies:
@ -9640,7 +9747,7 @@ packages:
/nuxt-component-meta/0.4.3:
resolution: {integrity: sha512-40wsnbCh2neNdKVrwSiqV/ea7QshYjp3kpfk8JZaxSW/XcgNg2tzka4L+M8caOvQalyAKi6AaENPLaTYOZDbQg==}
dependencies:
'@nuxt/kit': 3.1.0
'@nuxt/kit': 3.1.1
scule: 1.0.0
typescript: 4.9.4
vue-component-meta: 1.0.24_typescript@4.9.4
@ -9652,7 +9759,7 @@ packages:
/nuxt-config-schema/0.4.4:
resolution: {integrity: sha512-5NnyyH2qSgraQo6kcW/8SWqBZ/pEY/PwyepODPWYYv4ZZ8BiqC850OTmyO2oTBL4O+Xg4fR7hAwSB4g5pIMpSg==}
dependencies:
'@nuxt/kit': 3.1.0
'@nuxt/kit': 3.1.1
changelogen: 0.4.1
defu: 6.1.2
jiti: 1.16.2
@ -9667,7 +9774,7 @@ packages:
resolution: {integrity: sha512-Tv1oh33oLJfFDhQ5nMZ8I5vspbg7A8JTW7sVtD58gDkHfFzEHXBcXz7OesFZZQvKPwBWSKhBLgIenbFu5Jkzlw==}
dependencies:
'@iconify/vue': 4.0.2
'@nuxt/kit': 3.1.0
'@nuxt/kit': 3.1.1
nuxt-config-schema: 0.4.4
transitivePeerDependencies:
- rollup
@ -9679,7 +9786,7 @@ packages:
resolution: {integrity: sha512-Aqz+LM7pWAEismEJqhSPkihX+njX1bIJd62ygJfQuwyWWDD3EuUHJR5BxuPNd8KakT9MNhtM3AZ7bg0g/gqyqg==}
dependencies:
'@nozomuikuta/h3-cors': 0.1.8_defu@6.1.2
'@nuxt/kit': 3.0.0
'@nuxt/kit': 3.1.1
basic-auth: 2.0.1
defu: 6.1.2
limiter: 2.1.0
@ -9692,6 +9799,35 @@ packages:
- supports-color
dev: true
/nuxt-vitest/0.6.4_jsdom@21.1.0:
resolution: {integrity: sha512-38hQlqs1Fx6PjBnxnAk2la+z7KFaU4aTNTas0GcvSJ2GoPdVXienPTkLeiYeNWr0/2cQ1LGfR8ZVXFlldvJIFA==}
peerDependencies:
vite: '*'
dependencies:
'@nuxt/kit': 3.1.1
'@vitest/ui': 0.28.3
get-port-please: 3.0.1
perfect-debounce: 0.1.3
std-env: 3.3.1
vitest: 0.28.3_a7aimjszcawcicrmfep77vgtlm
vitest-environment-nuxt: 0.6.4_vitest@0.28.3
transitivePeerDependencies:
- '@edge-runtime/vm'
- '@vitest/browser'
- '@vue/compiler-dom'
- encoding
- happy-dom
- jsdom
- less
- rollup
- sass
- stylus
- sugarss
- supports-color
- terser
- vue
dev: true
/nuxt/3.0.0_no2el4fe4ggitllzolcgczmlgq:
resolution: {integrity: sha512-RNlD78uv04ZiXWmlx9f1tnJfrqsYAWHU+4gbgOTQpIBmQzHWPWiox+fm/1m93iKfEd5sJi9TJUoXX5yBObVZYw==}
engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0}
@ -9715,7 +9851,7 @@ packages:
estree-walker: 3.0.3
fs-extra: 10.1.0
globby: 13.1.3
h3: 1.0.2
h3: 1.1.0
hash-sum: 2.0.0
hookable: 5.4.2
knitwork: 1.0.0
@ -9732,7 +9868,7 @@ packages:
ufo: 1.0.1
ultrahtml: 1.2.0
unctx: 2.1.1
unenv: 1.0.1
unenv: 1.0.2
unhead: 1.0.18
unimport: 1.3.0
unplugin: 1.0.1
@ -9787,7 +9923,7 @@ packages:
estree-walker: 3.0.3
fs-extra: 11.1.0
globby: 13.1.3
h3: 1.0.2
h3: 1.1.0
hash-sum: 2.0.0
hookable: 5.4.2
jiti: 1.16.2
@ -9805,9 +9941,9 @@ packages:
ufo: 1.0.1
ultrahtml: 1.2.0
unctx: 2.1.1
unenv: 1.0.1
unenv: 1.0.2
unhead: 1.0.18
unimport: 2.0.1
unimport: 2.1.0
unplugin: 1.0.1
untyped: 1.2.2
vue: 3.2.45
@ -10749,6 +10885,10 @@ packages:
prosemirror-transform: 1.7.1
dev: false
/proto-list/1.2.4:
resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==}
dev: true
/protocols/2.0.1:
resolution: {integrity: sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==}
dev: true
@ -10757,6 +10897,10 @@ packages:
resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
dev: true
/pseudomap/1.0.2:
resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==}
dev: true
/psl/1.9.0:
resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
dev: true
@ -11419,6 +11563,10 @@ packages:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
dev: true
/sigmund/1.0.1:
resolution: {integrity: sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==}
dev: true
/signal-exit/3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
@ -11940,8 +12088,8 @@ packages:
resolution: {integrity: sha512-h80m9GPFGbcLzZByXlNSEhp1gf8Dy+VX/2JCGUZsWLo7lV1mnE/XlxGYgRBoMLJh1lIDXP0EMC4RPTjlRaV+Bg==}
dev: true
/tinypool/0.3.0:
resolution: {integrity: sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ==}
/tinypool/0.3.1:
resolution: {integrity: sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==}
engines: {node: '>=14.0.0'}
dev: true
@ -12208,8 +12356,8 @@ packages:
busboy: 1.6.0
dev: true
/unenv/1.0.1:
resolution: {integrity: sha512-08MoQ5+Edg9ckEP5y6vT8R6sOgCsNPxwPA1mKIOyergTtPOOuSyyJnbmF8CdnUplO2TUqSm0s1IysCkylxmndw==}
/unenv/1.0.2:
resolution: {integrity: sha512-senf7HmOHW3TuVCdhnrJcgVWabKnaU38oTRpppwWF0L6dJyfedY4MCiJeuwtrziqURZHuI2xxUoM90VLwG+e2Q==}
dependencies:
defu: 6.1.2
mime: 3.0.0
@ -12314,8 +12462,8 @@ packages:
- rollup
dev: true
/unimport/2.0.1:
resolution: {integrity: sha512-hMeDspGrEcocahicTr0AQYUGes24FvJtOxk9QEjeEOGv+n1EdpsDiT6z8t209PWhemPg0T5w/ooTVhup2GdrFA==}
/unimport/2.1.0:
resolution: {integrity: sha512-GDVIxATluUquX8EqelT6DtnmnZaXGID1jsO9IXwlnxb0OIEqKAxTOnTlnGmHbseoGTh+ZC9kcNDaO18HYQj9KA==}
dependencies:
'@rollup/pluginutils': 5.0.2
escape-string-regexp: 5.0.0
@ -12332,8 +12480,8 @@ packages:
- rollup
dev: true
/unimport/2.0.1_rollup@3.10.1:
resolution: {integrity: sha512-hMeDspGrEcocahicTr0AQYUGes24FvJtOxk9QEjeEOGv+n1EdpsDiT6z8t209PWhemPg0T5w/ooTVhup2GdrFA==}
/unimport/2.1.0_rollup@3.10.1:
resolution: {integrity: sha512-GDVIxATluUquX8EqelT6DtnmnZaXGID1jsO9IXwlnxb0OIEqKAxTOnTlnGmHbseoGTh+ZC9kcNDaO18HYQj9KA==}
dependencies:
'@rollup/pluginutils': 5.0.2_rollup@3.10.1
escape-string-regexp: 5.0.0
@ -12455,8 +12603,8 @@ packages:
- vite
dev: true
/unplugin-auto-import/0.12.1_@vueuse+core@9.11.1:
resolution: {integrity: sha512-J/3ZORq5YGKG+8D5vLLOgqaHNK77izlVN07mQ752yRLqBNDbJiwPRSnUwwYqH5N6rDay1SqnJCHaUdbJ9QMI2w==}
/unplugin-auto-import/0.13.0_@vueuse+core@9.11.1:
resolution: {integrity: sha512-nKMxDbkjM4FRPInFfm7sWrJOKgxfKKwb5yLPP+DEGl/SG0/FtBoW1LnZL4PQfx0FXjertoHO1P/5nDf+RSip2Q==}
engines: {node: '>=14'}
peerDependencies:
'@vueuse/core': '*'
@ -12469,7 +12617,7 @@ packages:
'@vueuse/core': 9.11.1
local-pkg: 0.4.3
magic-string: 0.27.0
unimport: 1.3.0
unimport: 2.1.0
unplugin: 1.0.1
transitivePeerDependencies:
- rollup
@ -12567,7 +12715,7 @@ packages:
anymatch: 3.1.3
chokidar: 3.5.3
destr: 1.2.2
h3: 1.0.2
h3: 1.1.0
ioredis: 5.2.5
listhen: 1.0.1
mkdir: 0.0.2
@ -12735,8 +12883,8 @@ packages:
- terser
dev: true
/vite-node/0.28.1_@types+node@18.11.18:
resolution: {integrity: sha512-Mmab+cIeElkVn4noScCRjy8nnQdh5LDIR4QCH/pVWtY15zv5Z1J7u6/471B9JZ2r8CEIs42vTbngaamOVkhPLA==}
/vite-node/0.28.3_@types+node@18.11.18:
resolution: {integrity: sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==}
engines: {node: '>=v14.16.0'}
hasBin: true
dependencies:
@ -12877,10 +13025,12 @@ packages:
- supports-color
dev: true
/vite-plugin-pwa/0.14.1:
/vite-plugin-pwa/0.14.1_tz3vz2xt4jvid2diblkpydcyn4:
resolution: {integrity: sha512-5zx7yhQ8RTLwV71+GA9YsQQ63ALKG8XXIMqRJDdZkR8ZYftFcRgnzM7wOWmQZ/DATspyhPih5wCdcZnAIsM+mA==}
peerDependencies:
vite: ^3.1.0 || ^4.0.0
workbox-build: ^6.5.4
workbox-window: ^6.5.4
dependencies:
'@rollup/plugin-replace': 5.0.2_rollup@3.10.1
debug: 4.3.4
@ -12890,7 +13040,6 @@ packages:
workbox-build: 6.5.4
workbox-window: 6.5.4
transitivePeerDependencies:
- '@types/babel__core'
- supports-color
dev: true
@ -13046,29 +13195,30 @@ packages:
fsevents: 2.3.2
dev: true
/vitest-environment-nuxt/0.4.0_vitest@0.28.1:
resolution: {integrity: sha512-uRg/jvgHjzUGhkWTWtFEUlImfA3VScZG2EGlRvQk9ODspUw0a9hTz9Yz9tXQTsChoE2n7yi44TJdCVmK7iHxUA==}
/vitest-environment-nuxt/0.6.4_vitest@0.28.3:
resolution: {integrity: sha512-cM65pFMFf6xJzF7pTwGKd092yV96brzaK7PoYs60DzL1pe8WJNPKuoQTtf2409mlA07dI7U4MxS5Pnwe4hWbzQ==}
peerDependencies:
vitest: ^0.24.5 || ^0.26.0 || ^0.27.0
vitest: ^0.24.5 || ^0.26.0 || ^0.27.0 || ^0.28.0
vue: ^3.2.45
dependencies:
'@nuxt/kit': 3.0.0
'@vue/test-utils': 2.2.7
'@nuxt/kit': 3.1.1
'@vue/test-utils': 2.2.8
estree-walker: 3.0.3
h3: 1.0.2
happy-dom: 8.1.5
h3: 1.1.0
happy-dom: 8.2.0
magic-string: 0.27.0
ofetch: 1.0.0
unenv: 1.0.1
vitest: 0.28.1_jsdom@21.1.0
unenv: 1.0.2
vitest: 0.28.3_a7aimjszcawcicrmfep77vgtlm
transitivePeerDependencies:
- '@vue/compiler-dom'
- encoding
- rollup
- supports-color
dev: true
/vitest/0.28.1_jsdom@21.1.0:
resolution: {integrity: sha512-F6wAO3K5+UqJCCGt0YAl3Ila2f+fpBrJhl9n7qWEhREwfzQeXlMkkCqGqGtzBxCSa8kv5QHrkshX8AaPTXYACQ==}
/vitest/0.28.3_a7aimjszcawcicrmfep77vgtlm:
resolution: {integrity: sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==}
engines: {node: '>=v14.16.0'}
hasBin: true
peerDependencies:
@ -13092,10 +13242,11 @@ packages:
'@types/chai': 4.3.4
'@types/chai-subset': 1.3.3
'@types/node': 18.11.18
'@vitest/expect': 0.28.1
'@vitest/runner': 0.28.1
'@vitest/spy': 0.28.1
'@vitest/utils': 0.28.1
'@vitest/expect': 0.28.3
'@vitest/runner': 0.28.3
'@vitest/spy': 0.28.3
'@vitest/ui': 0.28.3
'@vitest/utils': 0.28.3
acorn: 8.8.2
acorn-walk: 8.2.0
cac: 6.7.14
@ -13109,10 +13260,66 @@ packages:
std-env: 3.3.1
strip-literal: 1.0.0
tinybench: 2.3.1
tinypool: 0.3.0
tinypool: 0.3.1
tinyspy: 1.0.2
vite: 3.2.5_@types+node@18.11.18
vite-node: 0.28.1_@types+node@18.11.18
vite-node: 0.28.3_@types+node@18.11.18
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vitest/0.28.3_jsdom@21.1.0:
resolution: {integrity: sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==}
engines: {node: '>=v14.16.0'}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@vitest/browser': '*'
'@vitest/ui': '*'
happy-dom: '*'
jsdom: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
dependencies:
'@types/chai': 4.3.4
'@types/chai-subset': 1.3.3
'@types/node': 18.11.18
'@vitest/expect': 0.28.3
'@vitest/runner': 0.28.3
'@vitest/spy': 0.28.3
'@vitest/utils': 0.28.3
acorn: 8.8.2
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.7
debug: 4.3.4
jsdom: 21.1.0
local-pkg: 0.4.3
pathe: 1.1.0
picocolors: 1.0.0
source-map: 0.6.1
std-env: 3.3.1
strip-literal: 1.0.0
tinybench: 2.3.1
tinypool: 0.3.1
tinyspy: 1.0.2
vite: 3.2.5_@types+node@18.11.18
vite-node: 0.28.3_@types+node@18.11.18
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
@ -13699,6 +13906,10 @@ packages:
engines: {node: '>=10'}
dev: true
/yallist/2.1.2:
resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==}
dev: true
/yallist/3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
dev: true

View file

@ -0,0 +1,164 @@
// Vitest Snapshot v1
exports[`content-rich > block with backticks 1`] = `"<p><pre class=\\"code-block\\">[(\`number string) (\`tag string)]</pre></p>"`;
exports[`content-rich > block with injected html, with a known language 1`] = `
"<pre>
<code class=\\"language-js\\">
&lt;a href=&quot;javascript:alert(1)&quot;&gt;click me&lt;/a&gt;
</code>
</pre>
"
`;
exports[`content-rich > block with injected html, with an unknown language 1`] = `
"<pre>
<code class=\\"language-xyzzy\\">
&lt;a href=&quot;javascript:alert(1)&quot;&gt;click me&lt;/a&gt;
</code>
</pre>
"
`;
exports[`content-rich > block with injected html, without language 1`] = `
"<pre>
<code>
&lt;a href=&quot;javascript:alert(1)&quot;&gt;click me&lt;/a&gt;
</code>
</pre>
"
`;
exports[`content-rich > code frame 1`] = `
"<p>Testing code block</p><p></p><p><pre class=\\"code-block\\">import { useMouse, usePreferredDark } from &apos;@vueuse/core&apos;
// tracks mouse position
const { x, y } = useMouse()
// is the user prefers dark theme
const isDark = usePreferredDark()</pre></p>"
`;
exports[`content-rich > code frame 2 1`] = `
"<p>
<span class=\\"h-card\\"
><a
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
to=\\"/webtoo.ls/@antfu\\"
></a
></span>
Testing<br />
<pre class=\\"code-block\\">const a = hello</pre>
</p>
"
`;
exports[`content-rich > code frame empty 1`] = `"<p><pre class=\\"code-block\\"></pre><br></p>"`;
exports[`content-rich > code frame no lang 1`] = `"<p><pre class=\\"code-block\\">hello world</pre><br>no lang</p>"`;
exports[`content-rich > custom emoji 1`] = `
"Daniel Roe
<picture alt=\\":nuxt:\\" class=\\"custom-emoji\\" data-emoji-id=\\"nuxt\\"
><source
srcset=\\"
https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png
\\"
media=\\"(prefers-reduced-motion: reduce)\\" />
<img
src=\\"https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png\\"
alt=\\":nuxt:\\"
/></picture>
"
`;
exports[`content-rich > empty 1`] = `""`;
exports[`content-rich > group mention > html 1`] = `
"<p>
<span class=\\"h-card\\"
><a
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
to=\\"//@pilipinas@lemmy.ml\\"
></a
></span>
</p>
"
`;
exports[`content-rich > handles formatting from servers 1`] = `
"<h1>Fedi HTML Support Survey</h1>
<p>Does the following formatting come through accurately for you?</p>
<p></p>
<ul>
<li>This is an indented bulleted list (not just asterisks).</li>
<li><strong>This line is bold.</strong></li>
<li><em>This line is italic.</em></li>
</ul>
<ol>
<li>This list...</li>
<li>...is numbered and indented</li>
</ol>
<h1>This line is larger.</h1>
"
`;
exports[`content-rich > handles html within code blocks 1`] = `
"<p>
HTML block code:<br />
<pre class=\\"code-block\\">
&lt;span class=&quot;icon--noto icon--noto--1st-place-medal&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;icon--noto icon--noto--2nd-place-medal-medal&quot;&gt;&lt;/span&gt;</pre
>
</p>
"
`;
exports[`content-rich > inline code with link 1`] = `
"<p>
Inline code with link:
<code
>https://api.iconify.design/noto.css?icons=1st-place-medal,2nd-place-medal</code
>
</p>
"
`;
exports[`content-rich > link + mention 1`] = `
"<p>
Happy
<img
src=\\"/emojis/twemoji/1f917.svg\\"
alt=\\"🤗\\"
class=\\"iconify-emoji iconify-emoji--twemoji\\"
/>
were now using
<span class=\\"h-card\\"
><a
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
to=\\"/webtoo.ls/@vitest\\"
></a
></span>
(migrated from chai+mocha)
<a
href=\\"https://github.com/ayoayco/astro-reactive-library/pull/203\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
><span class=\\"invisible\\">https://</span
><span class=\\"ellipsis\\">github.com/ayoayco/astro-react</span
><span class=\\"invisible\\">ive-library/pull/203</span></a
>
</p>
"
`;
exports[`content-rich > plain text 1`] = `
"hello there
"
`;
exports[`editor > transform mentions 1`] = `
"
@elk Hello"
`;

View file

@ -0,0 +1,144 @@
// Vitest Snapshot v1
exports[`html-parse > code frame > html 1`] = `
"<p>Testing code block</p><p></p><p><pre><code class=\\"language-ts\\">import { useMouse, usePreferredDark } from '@vueuse/core'
// tracks mouse position
const { x, y } = useMouse()
// is the user prefers dark theme
const isDark = usePreferredDark()</code></pre></p>"
`;
exports[`html-parse > code frame > text 1`] = `
"Testing code block
\`\`\`ts
import { useMouse, usePreferredDark } from '@vueuse/core'
// tracks mouse position
const { x, y } = useMouse()
// is the user prefers dark theme
const isDark = usePreferredDark()
\`\`\`"
`;
exports[`html-parse > code frame 2 > html 1`] = `
"<p>
<span class=\\"h-card\\"
><a
href=\\"https://webtoo.ls/@antfu\\"
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
>@<span>antfu</span></a
></span
>
Testing<br />
<pre><code class=\\"language-ts\\">const a = hello</code></pre>
</p>
"
`;
exports[`html-parse > code frame 2 > text 1`] = `
"@antfu Testing
\`\`\`ts
const a = hello
\`\`\`"
`;
exports[`html-parse > custom emoji > html 1`] = `
"Daniel Roe
<picture alt=\\":nuxt:\\" class=\\"custom-emoji\\" data-emoji-id=\\"nuxt\\"
><source
srcset=\\"
https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png
\\"
media=\\"(prefers-reduced-motion: reduce)\\" />
<img
src=\\"https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png\\"
alt=\\":nuxt:\\"
/></picture>
"
`;
exports[`html-parse > custom emoji > text 1`] = `"Daniel Roe :nuxt:"`;
exports[`html-parse > emojis > html 1`] = `
"<img
src=\\"/emojis/twemoji/1f1eb-1f1f7.svg\\"
alt=\\"🇫🇷\\"
class=\\"iconify-emoji iconify-emoji--twemoji\\"
/>
<img
src=\\"/emojis/twemoji/1f468-200d-1f469-200d-1f466.svg\\"
alt=\\"👨‍👩‍👦\\"
class=\\"iconify-emoji iconify-emoji--twemoji\\"
/>
<img
src=\\"/emojis/twemoji/1f469-200d-1f692.svg\\"
alt=\\"👩‍🚒\\"
class=\\"iconify-emoji iconify-emoji--twemoji\\"
/><img
src=\\"/emojis/twemoji/1f9d1-1f3fd-200d-1f680.svg\\"
alt=\\"🧑🏽‍🚀\\"
class=\\"iconify-emoji iconify-emoji--twemoji\\"
/>
"
`;
exports[`html-parse > emojis > text 1`] = `"🇫🇷 👨‍👩‍👦 👩‍🚒🧑🏽‍🚀"`;
exports[`html-parse > empty > html 1`] = `""`;
exports[`html-parse > empty > text 1`] = `""`;
exports[`html-parse > html entities > html 1`] = `
"<p>Hello &lt;World /&gt;.</p>
"
`;
exports[`html-parse > html entities > text 1`] = `"Hello <World />."`;
exports[`html-parse > inline markdown > html 1`] = `"<p>text <code>code</code> <b>bold</b> <em>italic</em> <del>del</del></p><p></p><p><pre><code class=\\"language-js\\">code block</code></pre></p>"`;
exports[`html-parse > inline markdown > text 1`] = `
"text \`code\` **bold** *italic* ~~del~~
\`\`\`js
code block
\`\`\`"
`;
exports[`html-parse > link + mention > html 1`] = `
"<p>
Happy
<img
src=\\"/emojis/twemoji/1f917.svg\\"
alt=\\"🤗\\"
class=\\"iconify-emoji iconify-emoji--twemoji\\"
/>
were now using
<span class=\\"h-card\\"
><a
href=\\"https://webtoo.ls/@vitest\\"
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
>@<span>vitest</span></a
></span
>
(migrated from chai+mocha)
<a
href=\\"https://github.com/ayoayco/astro-reactive-library/pull/203\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
><span class=\\"invisible\\">https://</span
><span class=\\"ellipsis\\">github.com/ayoayco/astro-react</span
><span class=\\"invisible\\">ive-library/pull/203</span></a
>
</p>
"
`;
exports[`html-parse > link + mention > text 1`] = `"Happy 🤗 were now using @vitest (migrated from chai+mocha) https://github.com/ayoayco/astro-reactive-library/pull/203"`;

View file

@ -1,10 +1,10 @@
/* eslint-disable vue/one-component-per-file */
import { describe, expect, it, vi } from 'vitest'
import { renderToString } from 'vue/server-renderer'
import { format } from 'prettier'
import type { mastodon } from 'masto'
import { mockComponent } from 'nuxt-vitest/utils'
import { contentToVNode } from '~/composables/content-render'
import type { ContentParseOptions } from '~~/composables/content-parse'
import type { ContentParseOptions } from '~/composables/content-parse'
describe('content-rich', () => {
it('empty', async () => {
@ -298,14 +298,9 @@ vi.mock('~/components/content/ContentMentionGroup.vue', async () => {
}
})
vi.mock('~/components/account/AccountHoverWrapper.vue', async () => {
const { defineComponent } = await import('vue')
return {
default: defineComponent({
mockComponent('AccountHoverWrapper', {
props: ['handle', 'class'],
setup(_, { slots }) {
return () => slots?.default?.()
},
}),
}
})

View file

@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import { HANDLED_MASTO_URLS } from '../constants'
import { HANDLED_MASTO_URLS } from '~/constants'
const validPermalinks = [
'https://m1as-social34.to.social/@elk',

View file

@ -1,6 +1,6 @@
import { defineConfigWithNuxtEnv } from 'vitest-environment-nuxt/config'
import { defineVitestConfig } from 'nuxt-vitest'
export default defineConfigWithNuxtEnv({
export default defineVitestConfig({
define: {
'process.test': 'true',
},