Make WordPress Core

Opened 21 months ago

Last modified 8 months ago

#56250 new defect (bug)

ReferenceErrors encountered when running QUnit tests

Reported by: desrosj's profile desrosj Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: javascript Cc:

Description (last modified by desrosj)

When running QUnit tests, there are a handful of errors output:

Error: ReferenceError: QUnit is not defined
at <anonymous>:130:13
at HTMLDocument.<anonymous> (<anonymous>:132:2)

Even with these errors, no tests actually fail.

The number of errors also differences between grunt qunit (3) and grunt qunit:compiled (6).

Change History (7)

#1 @desrosj
21 months ago

Introduced in [53580].

#2 @desrosj
21 months ago

  • Description modified (diff)

This ticket was mentioned in Slack in #core by desrosj. View the logs.

21 months ago

This ticket was mentioned in Slack in #core by desrosj. View the logs.

18 months ago

#5 @TimoTijhof
10 months ago

This ticket is being discussed at in relation to a similar issue experienced in CI by ClassicPress.

Last edited 10 months ago by TimoTijhof (previous) (diff)

#6 @MattyRob
9 months ago

grunt-contrib-qunit 7.0.1 fixed this issue on the ClassicPress testing. The issues was due to a bug / feature in Puppeteer that meant that the bridge.js file in grunt-contrib-qunit was being injected into all frames, including those created during testing by TinyMCE for example.

A conditional check ensuring that the bridge is only loaded in the top frame has removed the encountered ReferenceErrors.

Last edited 9 months ago by MattyRob (previous) (diff)

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.

8 months ago

Note: See TracTickets for help on using tickets.