Skip to content

Commit 6a232ed

Browse files
👌 remove useless uses of [0] for unused snapshot results
1 parent 6e4daeb commit 6a232ed

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎packages/rum-recorder/src/domain/rrweb/mutationObserver.spec.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ describe('startMutationCollection', () => {
496496
describe('does not emit mutations occurring in ignored node', () => {
497497
it('when adding an ignored node', () => {
498498
ignoredElement.remove()
499-
snapshot(document)[0]!
499+
snapshot(document)
500500

501501
const { mutationController, mutationCallbackSpy } = startMutationCollection()
502502

@@ -508,7 +508,7 @@ describe('startMutationCollection', () => {
508508
})
509509

510510
it('when changing the attributes of an ignored node', () => {
511-
snapshot(document)[0]!
511+
snapshot(document)
512512

513513
const { mutationController, mutationCallbackSpy } = startMutationCollection()
514514

@@ -520,7 +520,7 @@ describe('startMutationCollection', () => {
520520
})
521521

522522
it('when adding a new child node', () => {
523-
snapshot(document)[0]!
523+
snapshot(document)
524524

525525
const { mutationController, mutationCallbackSpy } = startMutationCollection()
526526

@@ -534,7 +534,7 @@ describe('startMutationCollection', () => {
534534
it('when mutating a known child node', () => {
535535
const textNode = document.createTextNode('function foo() {}')
536536
sandbox.appendChild(textNode)
537-
snapshot(document)[0]!
537+
snapshot(document)
538538
ignoredElement.appendChild(textNode)
539539

540540
const { mutationController, mutationCallbackSpy } = startMutationCollection()
@@ -579,7 +579,7 @@ describe('startMutationCollection', () => {
579579
})
580580

581581
it('does not emit attribute mutations on hidden nodes', () => {
582-
snapshot(document)[0]!
582+
snapshot(document)
583583

584584
const { mutationController, mutationCallbackSpy } = startMutationCollection()
585585

@@ -592,7 +592,7 @@ describe('startMutationCollection', () => {
592592

593593
describe('does not emit mutations occurring in hidden node', () => {
594594
it('when adding a new node', () => {
595-
snapshot(document)[0]!
595+
snapshot(document)
596596

597597
const { mutationController, mutationCallbackSpy } = startMutationCollection()
598598

@@ -606,7 +606,7 @@ describe('startMutationCollection', () => {
606606
it('when mutating a known child node', () => {
607607
const textNode = document.createTextNode('function foo() {}')
608608
sandbox.appendChild(textNode)
609-
snapshot(document)[0]!
609+
snapshot(document)
610610
hiddenElement.appendChild(textNode)
611611

612612
const { mutationController, mutationCallbackSpy } = startMutationCollection()

0 commit comments

Comments
 (0)