uage-ts">+ }) 6
+})

+ 37 - 0
tests/e2e/support/commands.ts

@@ -0,0 +1,37 @@
1
+/// <reference types="cypress" />
2
+// ***********************************************
3
+// This example commands.ts shows you how to
4
+// create various custom commands and overwrite
5
+// existing commands.
6
+//
7
+// For more comprehensive examples of custom
8
+// commands please read more here:
9
+// https://on.cypress.io/custom-commands
10
+// ***********************************************
11
+//
12
+//
13
+// -- This is a parent command --
14
+// Cypress.Commands.add('login', (email, password) => { ... })
15
+//
16
+//
17
+// -- This is a child command --
18
+// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
19
+//
20
+//
21
+// -- This is a dual command --
22
+// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
23
+//
24
+//
25
+// -- This will overwrite an existing command --
26
+// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
27
+//
28
+// declare global {
29
+//   namespace Cypress {
30
+//     interface Chainable {
31
+//       login(email: string, password: string): Chainable<void>
32
+//       drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
33
+//       dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
34
+//       visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
35
+//     }
36
+//   }
37
+// }

+ 20 - 0
tests/e2e/support/e2e.ts

@@ -0,0 +1,20 @@
1
+// ***********************************************************
2
+// This example support/e2e.ts is processed and
3
+// loaded automatically before your test files.
4
+//
5
+// This is a great place to put global configuration and
6
+// behavior that modifies Cypress.
7
+//
8
+// You can change the location of this file or turn off
9
+// automatically serving support files with the
10
+// 'supportFile' configuration option.
11
+//
12
+// You can read more here:
13
+// https://on.cypress.io/configuration
14
+// ***********************************************************
15
+
16
+// Import commands.js using ES2015 syntax:
17
+import './commands'
18
+
19
+// Alternatively you can use CommonJS syntax:
20
+// require('./commands')

+ 10 - 0
tests/unit/example.spec.ts

@@ -0,0 +1,10 @@
1
+import { mount } from '@vue/test-utils'
2
+import Tab1Page from '@/views/Tab1Page.vue'
3
+import { describe, expect, test } from 'vitest'
4
+
5
+describe('Tab1Page.vue', () => {
6
+  test('renders tab 1 Tab1Page', () => {
7
+    const wrapper = mount(Tab1Page)
8
+    expect(wrapper.text()).toMatch('Tab 1 page')
9
+  })
10
+})

+ 21 - 0
tsconfig.json

@@ -0,0 +1,21 @@
1
+{
2
+  "compilerOptions": {
3
+    "target": "ESNext",
4
+    "useDefineForClassFields": true,
5
+    "module": "ESNext",
6
+    "moduleResolution": "Node",
7
+    "strict": true,
8
+    "jsx": "preserve",
9
+    "resolveJsonModule": true,
10
+    "isolatedModules": true,
11
+    "esModuleInterop": true,
12
+    "lib": ["ESNext", "DOM"],
13
+    "skipLibCheck": true,
14
+    "noEmit": true,
15
+    "paths": {
16
+      "@/*": ["./src/*"]
17
+    }
18
+  },
19
+  "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
20
+  "references": [{ "path": "./tsconfig.node.json" }]
21
+}

+ 9 - 0
tsconfig.node.json

@@ -0,0 +1,9 @@
1
+{
2
+  "compilerOptions": {
3
+    "composite": true,
4
+    "module": "ESNext",
5
+    "moduleResolution": "Node",
6
+    "allowSyntheticDefaultImports": true
7
+  },
8
+  "include": ["vite.config.ts"]
9
+}

+ 21 - 0
vite.config.ts

@@ -0,0 +1,21 @@
1
+import legacy from '@vitejs/plugin-legacy'
2
+import vue from '@vitejs/plugin-vue'
3
+import path from 'path'
4
+import { defineConfig } from 'vite'
5
+
6
+// https://vitejs.dev/config/
7
+export default defineConfig({
8
+  plugins: [
9
+    vue(),
10
+    legacy()
11
+  ],
12
+  resolve: {
13
+    alias: {
14
+      '@': path.resolve(__dirname, './src'),
15
+    },
16
+  },
17
+  test: {
18
+    globals: true,
19
+    environment: 'jsdom'
20
+  }
21
+})

tum/recycle_server - Gogs: Simplico Git Service

Ei kuvausta

2608_fsm 24KB