mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
test: добавить площадку интеграционного тестирования
- добавлены consumer fixtures для React и Next.js - добавлены typecheck, production build и браузерные smoke-тесты - добавлена интеграционная проверка в CI
This commit is contained in:
32
integration/apps/nuxt/app/app.vue
Normal file
32
integration/apps/nuxt/app/app.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<main>
|
||||
<h1>Nuxt</h1>
|
||||
<svg
|
||||
data-testid="icon"
|
||||
data-app="nuxt"
|
||||
aria-label="Check icon"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<use href="/sprites/icons.sprite.svg#check" />
|
||||
</svg>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
font-family: system-ui, sans-serif;
|
||||
color: #172033;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
[data-testid='icon'] {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
color: #16a34a;
|
||||
}
|
||||
</style>
|
||||
4
integration/apps/nuxt/nuxt.config.ts
Normal file
4
integration/apps/nuxt/nuxt.config.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2026-07-01',
|
||||
devtools: { enabled: false },
|
||||
})
|
||||
22
integration/apps/nuxt/package.json
Normal file
22
integration/apps/nuxt/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "@svg-sprites-fixtures/nuxt",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"sprites": "svg-sprites --mode legacy .",
|
||||
"typecheck": "nuxt typecheck",
|
||||
"build": "npm run sprites && nuxt build",
|
||||
"dev": "npm run sprites && nuxt dev",
|
||||
"start": "node .output/server/index.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"nuxt": "4.3.1",
|
||||
"vue": "3.5.39"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gromlab/svg-sprites": "file:../../..",
|
||||
"typescript": "6.0.2",
|
||||
"vue-tsc": "3.3.7"
|
||||
}
|
||||
}
|
||||
11
integration/apps/nuxt/svg-sprites.config.ts
Normal file
11
integration/apps/nuxt/svg-sprites.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
output: 'public/sprites',
|
||||
preview: false,
|
||||
sprites: [
|
||||
{
|
||||
name: 'icons',
|
||||
input: '../../fixtures/icons',
|
||||
format: 'symbol',
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user