Skip to content

Commit

Permalink
Add additional assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Aug 31, 2022
1 parent 663f765 commit cee6dc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module.exports = async ({ page, url, requests }) => {
'Returned data must contain original data returned from getInitialProps.',
);

assert.ok(nextDataTagValue.props.pageProps._sentryTraceData, '_sentryTraceData must exist in __NEXT_DATA__ tag');
assert.ok(nextDataTagValue.props.pageProps._sentryBaggage, '_sentryBaggage must exist in __NEXT_DATA__ tag');

assert.strictEqual(
nextDataTagValue.props.pageProps._sentryTraceData.split('-')[0],
transactionEnvelope.envelopeHeader.trace.trace_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module.exports = async ({ page, url, requests }) => {
'Returned data must contain original data returned from getServerSideProps.',
);

assert.ok(nextDataTagValue.props.pageProps._sentryTraceData, '_sentryTraceData must exist in __NEXT_DATA__ tag');
assert.ok(nextDataTagValue.props.pageProps._sentryBaggage, '_sentryBaggage must exist in __NEXT_DATA__ tag');

assert.strictEqual(
nextDataTagValue.props.pageProps._sentryTraceData.split('-')[0],
transactionEnvelope.envelopeHeader.trace.trace_id,
Expand Down

0 comments on commit cee6dc3

Please sign in to comment.