Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#18809 closed defect (fixed)

[Regression] In 1.10 branch test of dojo/_base/lang fails in all browsers.

Reported by: Clement Mathieu Owned by:
Priority: undecided Milestone: 1.10.8
Component: Testing Version: 1.10.5
Keywords: Cc:
Blocked By: Blocking:

Description

I ran dojo core doh tests against the 1.10 branch. The test tests._base.lang::getObject is failing on Firefox 38 ESR, Chrome 48 and IE 11.

Here is the log I got:

_AssertFailure: http://localhost/dev/dojo/dojo.js line 345 > Function line 1 > eval:47 assertEqual() failed:
	expected
		[object Window]
	but got
		undefined

ERROR IN:
	(function getObject(t){
		var test = {
			foo : {}
		};
		t.assertEqual(test.foo, lang.getObject("foo", false, test), 'lang.getObject("foo", false, test)');
		t.assertEqual("undefined", typeof lang.getObject("foo.bar", false, test), // don't create
			'typeof lang.getObject("foo.bar", false, test)');
		t.assertEqual({}, lang.getObject("foo.bar", true, test),  // do create
			'lang.getObject("foo.bar", true, test)');
		test.foo.bar.baz = "test";
		t.assertEqual(test.foo.bar, lang.getObject("foo.bar", false, test),
			'lang.getObject("foo.bar", false, test)');

		// global tests
		t.assertEqual("undefined", typeof lang.getObject("_getObjectTest.bar", false),	// don't create
			'typeof lang.getObject("_getObjectTest.bar", false)');
		kernel.global._getObjectTest = {};
		t.assertEqual(kernel.global._getObjectTest, lang.getObject("_getObjectTest", false), // don't create
			'lang.getObject("_getObjectTest", false)');
		t.assertEqual({}, lang.getObject("_getObjectTest.bar", true), 'lang.getObject("_getObjectTest.bar", true)'); // do create

		// strangely, parser does this
		t.assertEqual("undefined", typeof lang.getObject("./TestWidget"), 'typeof lang.getObject("./TestWidget")');

		// empty path should return the same object
		t.assertEqual(test, lang.getObject("", false, test));
		t.assertEqual(kernel.global, lang.getObject(""));
	})

Change History (7)

comment:1 Changed 3 years ago by dylan

Status: newpending

I don't think this is failing the comparable Intern test however.... perhaps due to an API update?

comment:2 Changed 3 years ago by dylan

Milestone: tbd1.12
Status: pendingnew

comment:3 Changed 3 years ago by dylan

Milestone: 1.121.10.7
Version: 1.11.0-rc41.10.5

comment:4 Changed 3 years ago by dylan

Milestone: 1.10.71.10.8

comment:5 Changed 3 years ago by jroufa

Pull request submitted here: https://github.com/dojo/dojo/pull/247

I updated the assertions within the getObject test in the lang suite so that they match up against the latest assertions in the Intern-based unit tests from 1.12. This suite is passing again. Please let me know if you have any further questions!

comment:6 Changed 3 years ago by dylan

Component: GeneralTesting
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.