mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-09 14:32:07 -05:00
Add regression test for adapter's empty field handling
This commit is contained in:
parent
7427fe4ff3
commit
9f89caa0e6
2 changed files with 13 additions and 0 deletions
6
test/fixtures/events.json
vendored
6
test/fixtures/events.json
vendored
|
@ -53,5 +53,11 @@
|
||||||
"xml": {
|
"xml": {
|
||||||
"outerHTML": "></xml>"
|
"outerHTML": "></xml>"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"createemptyfield": {
|
||||||
|
"name": "block",
|
||||||
|
"xml": {
|
||||||
|
"outerHTML": "<block type='operator_equals' id='l^H_{8[DDyDW?m)HIt@b' x='100' y='362'><value name='OPERAND1'><shadow type='text' id='Ud@4y]bc./]uv~te?brb'><field name='TEXT'></field></shadow></value><value name='OPERAND2'><shadow type='text' id='p8[y..,[K;~G,k7]N;08'><field name='TEXT'></field></shadow></value></block>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,3 +165,10 @@ test('create with invalid xml', function (t) {
|
||||||
t.equal(result.length, 0);
|
t.equal(result.length, 0);
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('create with empty field', function (t) {
|
||||||
|
var result = adapter(events.createemptyfield);
|
||||||
|
t.ok(Array.isArray(result));
|
||||||
|
t.equal(result.length, 3);
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue