Skip to content

Commit 5d636ff

Browse files
committed
try using helper function in one test
1 parent 6f0b32d commit 5d636ff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/nextjs/test/config.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
} from '../src/config/types';
1616
import {
1717
constructWebpackConfigFunction,
18+
findWebpackPlugin,
1819
getUserConfigFile,
1920
getWebpackPluginOptions,
2021
SentryWebpackPlugin,
@@ -335,8 +336,12 @@ describe('Sentry webpack plugin config', () => {
335336
incomingWebpackConfig: serverWebpackConfig,
336337
incomingWebpackBuildContext: serverBuildContext,
337338
});
339+
const sentryWebpackPluginInstance = findWebpackPlugin(
340+
finalWebpackConfig,
341+
'SentryCliPlugin',
342+
) as SentryWebpackPluginType;
338343

339-
expect(finalWebpackConfig.plugins?.[0].options).toEqual(
344+
expect(sentryWebpackPluginInstance.options).toEqual(
340345
expect.objectContaining({
341346
include: expect.any(Array), // default, tested separately elsewhere
342347
ignore: [], // default

0 commit comments

Comments
 (0)