-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
28 lines (25 loc) · 808 Bytes
/
vitest.config.js
File metadata and controls
28 lines (25 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
// Filter out expected error logs from test output
onConsoleLog(log, type) {
// List of expected error patterns that are intentionally tested
const expectedErrors = [
"Message handling error",
"Failed to mark as read",
"Failed to mark repo as read",
"Failed to create desktop notification",
"Failed to clear notification",
"Failed to fetch details for notification",
"Failed to notify background worker",
"Device Flow error",
];
// Hide expected error logs
if (type === "stderr") {
return !expectedErrors.some((pattern) => log.includes(pattern));
}
return true;
},
},
});