Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Jul 27, 2022
1 parent 9e9a7bb commit 9add59c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/nextjs/test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ async function materializeFinalWebpackConfig(options: {
const webpackConfigFunction = constructWebpackConfigFunction(
materializedUserNextConfig,
userSentryWebpackPluginConfig,
materializedUserNextConfig.sentry,
);

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

for (const pathDescriptor of includePaths) {
for (const path of pathDescriptor.paths) {
Expand All @@ -887,9 +890,11 @@ describe('Sentry webpack plugin config', () => {
[getBuildContext('server', { distDir: 'tmpDir' }, '4'), 'tmpDir'],
[getBuildContext('server', { distDir: 'tmpDir' }, '5'), 'tmpDir'],
])('`distDir` is defined', (buildContext: BuildContext, expectedDistDir) => {
const includePaths = getWebpackPluginOptions(buildContext, {
/** userPluginOptions */
}).include as { paths: [] }[];
const includePaths = getWebpackPluginOptions(
buildContext,
{}, // userPluginOptions
{}, // userSentryOptions
).include as { paths: [] }[];

for (const pathDescriptor of includePaths) {
for (const path of pathDescriptor.paths) {
Expand Down

0 comments on commit 9add59c

Please sign in to comment.