File tree Expand file tree Collapse file tree 4 files changed +9
-771
lines changed Expand file tree Collapse file tree 4 files changed +9
-771
lines changed Original file line number Diff line number Diff line change 33
44// Test that the Slint event loop processes libuv's events.
55
6- import { test , expect } from "vitest" ;
6+ import { test , expect , afterEach } from "vitest" ;
77import * as http from "node:http" ;
88
99import { runEventLoop , quitEventLoop , private_api } from "../dist/index.js" ;
1010
11+ afterEach ( ( ) => {
12+ quitEventLoop ( ) ;
13+ } ) ;
14+
1115test . sequential ( "merged event loops with timer" , async ( ) => {
1216 let invoked = false ;
1317
Original file line number Diff line number Diff line change 2020 ],
2121 "description" : " Slint is a declarative GUI toolkit to build native user interfaces for desktop and embedded applications." ,
2222 "devDependencies" : {
23- "@ava/typescript" : " 6.0.0" ,
2423 "@biomejs/biome" : " catalog:" ,
2524 "@types/capture-console" : " 1.0.5" ,
2625 "@types/node" : " catalog:" ,
27- "ava" : " 6.4.1" ,
2826 "capture-console" : " 1.0.2" ,
2927 "jimp" : " 1.6.0" ,
3028 "typedoc" : " 0.28.14" ,
5048 "lint:fix" : " biome lint --fix" ,
5149 "test" : " vitest run"
5250 },
53- "ava" : {
54- "typescript" : {
55- "rewritePaths" : {
56- "__test__/" : " build/"
57- },
58- "compile" : false ,
59- "extensions" : [
60- " mts"
61- ]
62- },
63- "timeout" : " 2m" ,
64- "workerThreads" : false ,
65- "files" : [
66- " **/*.spec.mts" ,
67- " !**/window.spec.mts" ,
68- " !**/types.spec.mts" ,
69- " !**/models.spec.mts" ,
70- " !**/globals.spec.mts" ,
71- " !**/compiler.spec.mts" ,
72- " !**/api.spec.mts" ,
73- " !**/js_value_conversion.spec.mts" ,
74- " !**/eventloop.spec.mts"
75- ]
76- },
7751 "dependencies" : {
7852 "@napi-rs/cli" : " 2.18.4" ,
7953 "strip-ansi" : " 7.1.2"
Original file line number Diff line number Diff line change @@ -5,18 +5,10 @@ import { defineConfig } from "vitest/config";
55
66export default defineConfig ( {
77 test : {
8- include : [
9- "**/window.spec.mts" ,
10- "**/types.spec.mts" ,
11- "**/models.spec.mts" ,
12- "**/globals.spec.mts" ,
13- "**/compiler.spec.mts" ,
14- "**/api.spec.mts" ,
15- "**/js_value_conversion.spec.mts" ,
16- "**/eventloop.spec.mts" ,
17- ] ,
8+ include : [ "**/*.spec.mts" ] ,
189 globals : true , // Enable global test/expect/describe
19- isolate : true , // Use separate processes for isolation (matching ava's workerThreads: false)
20- reporters : [ "verbose" ] , // Show individual test names (similar to Ava output)
10+ pool : "forks" , // Use process forks (required for native modules that need main thread)
11+ teardownTimeout : 5000 , // Force teardown after 5s to prevent hanging processes
12+ reporters : [ "verbose" ] , // Show individual test names
2113 } ,
2214} ) ;
You can’t perform that action at this time.
0 commit comments