mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Проверка 09.02.2025
This commit is contained in:
2659
frontend/package-lock.json
generated
2659
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "echo \"No tests configured yet\" && exit 0"
|
||||
"test": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vueuse/core": "^10.9.0",
|
||||
@@ -20,13 +20,17 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/vue": "^8.1.0",
|
||||
"@types/node": "^20.17.11",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"autoprefixer": "^10.4.18",
|
||||
"jsdom": "^26.0.0",
|
||||
"postcss": "^8.4.35",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.1.4",
|
||||
"vitest": "^3.0.5",
|
||||
"vue-tsc": "^2.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/vue';
|
||||
import '@testing-library/jest-dom';
|
||||
import App from './App';
|
||||
import App from './App.vue';
|
||||
|
||||
test('renders app header', () => {
|
||||
render(<App />);
|
||||
render(App, { global: { stubs: ['router-view'] } });
|
||||
const headerElement = screen.getByText(/Employee Request System/i);
|
||||
expect(headerElement).toBeInTheDocument();
|
||||
});
|
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
<div>
|
||||
<h1>Employee Request System</h1>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
1
frontend/src/setupTests.js
Normal file
1
frontend/src/setupTests.js
Normal file
@@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom';
|
@@ -1,6 +1,6 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import path from 'path';
|
||||
|
||||
@@ -31,5 +31,10 @@ export default defineConfig({
|
||||
changeOrigin: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
globals: true,
|
||||
setupFiles: './src/setupTests.js'
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user