Open
Description
Subject of the issue
After the release of 1.1.3, some tests related to props comparison started to fail. For example a test similar to the one below resulted in
AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal:
[
'Q',
'W',
'E',
'R',
'T',
'Y',
'U',
'I',
'O',
'P'
]
Steps to reproduce
const assert = require("assert");
const testUtils = require("@vue/test-utils");
const components = require("./components");
it("should have valid characters set", () => {
const component = testUtils(components["Keyboard"], {
propsData: { keys: ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"] }
});
assert.deepStrictEqual(component.vm.$props.keys, [
"Q",
"W",
"E",
"R",
"T",
"Y",
"U",
"I",
"O",
"P"
]);
});
Expected behaviour
It should result in a valid comparison.
Actual behaviour
The test fails while comparing the same array.
Possible Solution
I checked the diff between the 1.1.2 and 1.1.3 (v1.1.2...v1.1.3) and some changes were made to create-instance.js
and wrapper.js
. I suspect the regression was introduced there.