mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
17 lines
336 B
Plaintext
17 lines
336 B
Plaintext
```ts
|
|
// .storybook/test-runner.ts
|
|
|
|
import type { TestRunnerConfig } from '@storybook/test-runner';
|
|
|
|
const config: TestRunnerConfig = {
|
|
getHttpHeaders: async (url) => {
|
|
const token = url.includes('prod') ? 'prod-token' : 'dev-token';
|
|
return {
|
|
Authorization: `Bearer ${token}`,
|
|
};
|
|
},
|
|
};
|
|
|
|
export default config;
|
|
```
|