Make WordPress Core

Opened 22 months ago

Last modified 10 months ago

#48229 new defect (bug)

Console error when running QUnit Test Suite

Reported by: Hareesh Pillai Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:


There is a 404 (Not Found) error reported in the browser console for the admin-ajax.php file while running QUnit Test Suite.

After selectively running the tests, I could narrow it down to the image widget control tests in the Image Media Widget module.

Although all the tests are passing, this error should be fixed.

Attachments (1)

Console error.png (228.0 KB) - added by Hareesh Pillai 22 months ago.
Screenshot of the console error

Download all attachments as: .zip

Change History (5)

@Hareesh Pillai
22 months ago

Screenshot of the console error

This ticket was mentioned in Slack in #core-js by hareesh-pillai. View the logs.

22 months ago

#2 @iandunn
10 months ago

  • Keywords reporter-feedback added

Hi Hareesh 👋🏻

It's working for me now, are you still seeing that error?

If so, it could be a routing issue with your web server, since the tests are setup a little weird. Here's my Nginx config:

server {
	listen       80;
	server_name  wp-develop.test;
	root         /Users/ian-work/vhosts/localhost/wp-develop.test/public_html/build;

	location /tests/ {
		root /Users/ian-work/vhosts/localhost/wp-develop.test/public_html/;
		try_files $uri $uri/ /wordpress/$uri /wordpress/index.php?$args;

	# this is also necessary for qunit
	location /node_modules/ {
		root /Users/ian-work/vhosts/localhost/wp-develop.test/public_html/;
		try_files $uri $uri/ /wordpress/$uri /wordpress/index.php?$args;

If routing isn't the problem, you could try opening them directly in your browser, with a URL like file:///Users/myusername/dev/develop.svn.wordpress.org/trunk/tests/qunit/index.html

#3 @Hareesh Pillai
10 months ago

  • Keywords reporter-feedback removed

Thanks for the comment @iandunn.

I still see the same error while running the tests from localhost. However, when I try running directly with the URL like you suggested, there is no console error.

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

10 months ago

Note: See TracTickets for help on using tickets.