mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Tests: Handle null values when comparing items.
This commit is contained in:
parent
3a49ac4015
commit
b4f6cde203
1 changed files with 2 additions and 0 deletions
|
@ -243,6 +243,8 @@ var compareItem = function(actual, expected, message, options, properties) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
if (options.rasterize) {
|
if (options.rasterize) {
|
||||||
comparePixels(actual, expected, message, options);
|
comparePixels(actual, expected, message, options);
|
||||||
|
} else if (!actual || !expected) {
|
||||||
|
QUnit.strictEqual(actual, expected, message);
|
||||||
} else {
|
} else {
|
||||||
if (options.cloned)
|
if (options.cloned)
|
||||||
QUnit.notStrictEqual(actual.id, expected.id,
|
QUnit.notStrictEqual(actual.id, expected.id,
|
||||||
|
|
Loading…
Reference in a new issue