Make WordPress Core

Opened 2 years ago

Last modified 12 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
2 years ago

Introduced in [53580].

#2 @desrosj
2 years ago

  • Description modified (diff)

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


2 years ago

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


21 months ago

#5 @TimoTijhof
13 months ago

This ticket is being discussed at https://github.com/gruntjs/grunt-contrib-qunit/issues/202 in relation to a similar issue experienced in CI by ClassicPress.

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

#6 @MattyRob
13 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 13 months ago by MattyRob (previous) (diff)

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


12 months ago

Note: See TracTickets for help on using tickets.