mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Add test coverage
This commit is contained in:
parent
5af99566fa
commit
963078210a
1 changed files with 7 additions and 0 deletions
|
@ -141,6 +141,13 @@ test('length', t => {
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('contains', t => {
|
||||||
|
t.strictEqual(blocks.contains({STRING1: 'hello world', STRING2: 'hello'}), true);
|
||||||
|
t.strictEqual(blocks.contains({STRING1: 'foo', STRING2: 'bar'}), false);
|
||||||
|
t.strictEqual(blocks.contains({STRING1: 'HeLLo world', STRING2: 'hello'}), true);
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
|
||||||
test('mod', t => {
|
test('mod', t => {
|
||||||
t.strictEqual(blocks.mod({NUM1: 1, NUM2: 1}), 0);
|
t.strictEqual(blocks.mod({NUM1: 1, NUM2: 1}), 0);
|
||||||
t.strictEqual(blocks.mod({NUM1: 3, NUM2: 6}), 3);
|
t.strictEqual(blocks.mod({NUM1: 3, NUM2: 6}), 3);
|
||||||
|
|
Loading…
Reference in a new issue