fix(slack): use named import for @slack/bolt App class (#299)

* fix(slack): use named import for @slack/bolt App class

The default import `import bolt from '@slack/bolt'` followed by
`const { App } = bolt` doesn't work correctly in Bun due to ESM/CJS
interop issues. The default export comes through as a function rather
than the module object.

Switching to a named import `import { App } from '@slack/bolt'`
resolves the issue and allows the Slack provider to start successfully.

* fix(slack): align Bolt mock with named App export

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Simon Kelly
2026-01-06 16:22:14 +02:00
committed by GitHub
parent c16510c6ea
commit 5aa1ed2c96
3 changed files with 6 additions and 6 deletions

View File

@@ -70,7 +70,7 @@ vi.mock("@slack/bolt", () => {
start = vi.fn().mockResolvedValue(undefined);
stop = vi.fn().mockResolvedValue(undefined);
}
return { default: { App } };
return { App, default: { App } };
});
const flush = () => new Promise((resolve) => setTimeout(resolve, 0));