diff --git a/test/unit/blocks_looks.js b/test/unit/blocks_looks.js index 74d4a6fe8..6cc9f7c9c 100644 --- a/test/unit/blocks_looks.js +++ b/test/unit/blocks_looks.js @@ -54,9 +54,12 @@ test('switch costume block runs correctly', t => { // Non-existant costumes do nothing t.strictEqual(testCostume(['a', 'b', 'c', 'd'], 'e', 3), 3); - // Difference between string and numeric arguments + // Numeric arguments are always the costume index + // String arguments are treated as costume names, and coerced to + // a costume index as a fallback t.strictEqual(testCostume(['a', 'b', 'c', '2'], 2), 2); t.strictEqual(testCostume(['a', 'b', 'c', '2'], '2'), 4); + t.strictEqual(testCostume(['a', 'b', 'c'], '2'), 2); // 'previous costume' and 'next costume' increment/decrement t.strictEqual(testCostume(['a', 'b', 'c', 'd'], 'previous costume', 3), 2);