Skip to content

Commit defce67

Browse files
authored
ref(ember): Fix tests to be forward compatible with component changes (#3347)
* ref(ember): Fix tests to be forward compatible with component changes One of the frameworks provided components, link-to, had a change to it's internal name. It's not really relevant to the test, so normalizing the description should work across the version changes.
1 parent a6f8dc2 commit defce67

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/ember/tests/acceptance/sentry-performance-test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ function assertSentryCall(assert, callNumber, options) {
2323
}
2424
if (options.spans) {
2525
assert.deepEqual(
26-
event.spans.map(s => `${s.op} | ${s.description}`),
26+
event.spans.map(s => {
27+
// Normalize span descriptions for internal components so tests work on either side of updated Ember versions
28+
const normalizedDescription = s.description === 'component:-link-to' ? 'component:link-to' : s.description;
29+
return `${s.op} | ${normalizedDescription}`;
30+
}),
2731
options.spans,
2832
`Has correct spans`,
2933
);

0 commit comments

Comments
 (0)