storybook/docs/snippets/common/test-runner-auth.js.mdx
2023-11-17 10:48:14 +00:00

13 lines
218 B
Plaintext

```js
// .storybook/test-runner.js
module.exports = {
getHttpHeaders: async (url) => {
const token = url.includes('prod') ? 'XYZ' : 'ABC';
return {
Authorization: `Bearer ${token}`,
};
},
};
```