Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion devserver/src/components/sideContent/SideContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const renderTab = (
) => {
const tabProps: TabProps = {
id: tab.id,
// @ts-expect-error Disable until we migrate tabs to the new icon format?
title: <TabIcon iconName={tab.iconName} tooltip={tab.label} shouldAlert={shouldAlert} />,
// disabled: tab.disabled,
className: 'side-content-tab'
Expand Down
2 changes: 1 addition & 1 deletion lib/buildtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"esbuild": "^0.27.0",
"eslint": "^9.35.0",
"http-server": "^14.1.1",
"jsdom": "^26.1.0",
"jsdom": "^29.0.0",
"typedoc": "^0.28.9",
"vite": "^7.1.11",
"vitest": "^4.0.18"
Expand Down
1 change: 0 additions & 1 deletion lib/modules-lib/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default mergeConfig(
environment: 'jsdom',
browser: {
enabled: true,
// headless: true,
provider: playwright(),
instances: [{
browser: 'chromium',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-yml": "^3.0.0",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"jsdom": "^29.0.0",
"jsonc-eslint-parser": "^2.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
8 changes: 8 additions & 0 deletions src/tabs/Curve/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// Curve Tab vitest.config
import pathlib from 'path';
import { defineProject } from 'vitest/config';

export default defineProject({
resolve: {
alias: [{
find: /^js-slang\/context/,
replacement: pathlib.join(import.meta.dirname, '../../__mocks__/context.ts')
}]
},
optimizeDeps: {
include: [
'js-slang',
'js-slang/dist/utils/stringify',
]
},
Expand Down
8 changes: 8 additions & 0 deletions src/tabs/Rune/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// Rune Tab vitest.config.js
import pathlib from 'path';
import { defineProject } from 'vitest/config';

export default defineProject({
resolve: {
alias: [{
find: /^js-slang\/context/,
replacement: pathlib.join(import.meta.dirname, '../../__mocks__/context.ts')
}]
},
optimizeDeps: {
include: [
'js-slang',
'js-slang/dist/utils/stringify'
]
},
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
}]
},
test: {
setupFiles: [pathlib.join(import.meta.dirname, 'vitest.setup.ts')],
projects: [
'./.github/actions',
'./devserver',
Expand Down
27 changes: 27 additions & 0 deletions vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Workaround for jsdom/undici compatibility issue
// See: https://github.com/nodejs/undici/issues/4000

// This setup file patches the global undici dispatcher to avoid
// "invalid onError method" errors during jsdom tests

try {
// Try to patch undici dispatcher
const undici = await import('undici');

// @ts-expect-error - undici types may not exist
if (typeof setGlobalDispatcher === 'function' && undici.Agent) {
// @ts-expect-error - setGlobalDispatcher may not be typed
setGlobalDispatcher(new undici.Agent());
}
} catch {
// Ignore if undici patching fails - this is expected in some environments
}

// Suppress unhandled rejection errors from jsdom/undici (Node.js only)
if (typeof process !== 'undefined' && process.on) {
process.on('unhandledRejection', (reason: any) => {
if (reason?.code === 'UND_ERR_INVALID_ARG') {
// Ignore undici invalid argument errors from jsdom cleanup
}
});
}
Loading
Loading