Skip to content

Commit 9add59c

Browse files
committed
fix tests
1 parent 9e9a7bb commit 9add59c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

packages/nextjs/test/config.test.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ async function materializeFinalWebpackConfig(options: {
200200
const webpackConfigFunction = constructWebpackConfigFunction(
201201
materializedUserNextConfig,
202202
userSentryWebpackPluginConfig,
203+
materializedUserNextConfig.sentry,
203204
);
204205

205206
// call it to get concrete values for comparison
@@ -870,9 +871,11 @@ describe('Sentry webpack plugin config', () => {
870871
[getBuildContext('server', {}, '4'), '.next'],
871872
[getBuildContext('server', {}, '5'), '.next'],
872873
])('`distDir` is not defined', (buildContext: BuildContext, expectedDistDir) => {
873-
const includePaths = getWebpackPluginOptions(buildContext, {
874-
/** userPluginOptions */
875-
}).include as { paths: [] }[];
874+
const includePaths = getWebpackPluginOptions(
875+
buildContext,
876+
{}, // userPluginOptions
877+
{}, // userSentryOptions
878+
).include as { paths: [] }[];
876879

877880
for (const pathDescriptor of includePaths) {
878881
for (const path of pathDescriptor.paths) {
@@ -887,9 +890,11 @@ describe('Sentry webpack plugin config', () => {
887890
[getBuildContext('server', { distDir: 'tmpDir' }, '4'), 'tmpDir'],
888891
[getBuildContext('server', { distDir: 'tmpDir' }, '5'), 'tmpDir'],
889892
])('`distDir` is defined', (buildContext: BuildContext, expectedDistDir) => {
890-
const includePaths = getWebpackPluginOptions(buildContext, {
891-
/** userPluginOptions */
892-
}).include as { paths: [] }[];
893+
const includePaths = getWebpackPluginOptions(
894+
buildContext,
895+
{}, // userPluginOptions
896+
{}, // userSentryOptions
897+
).include as { paths: [] }[];
893898

894899
for (const pathDescriptor of includePaths) {
895900
for (const path of pathDescriptor.paths) {

0 commit comments

Comments
 (0)