From ee936e3d36be99152b157bab41d18cb5c06ebbe7 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Mon, 28 Jan 2019 12:54:07 -0500 Subject: [PATCH] Fix tests for reordering costumes and sounds. --- test/unit/project_changed_state.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/project_changed_state.js b/test/unit/project_changed_state.js index d0d1c801b..f910a603f 100644 --- a/test/unit/project_changed_state.js +++ b/test/unit/project_changed_state.js @@ -154,7 +154,8 @@ test('Reordering a sprite should emit a project changed event', t => { test('Reordering a costume should emit a project changed event', t => { t.equal(vm.editingTarget.sprite.costumes.length, 2); const spriteId = vm.editingTarget.id; - vm.reorderCostume(spriteId, 2, 1); + const reordered = vm.reorderCostume(spriteId, 1, 0); + t.equal(reordered, true); t.equal(projectChanged, true); t.end(); }); @@ -172,7 +173,8 @@ test('Reordering a sound should emit a project changed event', t => { // Reset the project changed flag to ignore change from adding new sound projectChanged = false; t.equal(vm.editingTarget.sprite.sounds.length, 2); - vm.reorderSound(spriteId, 2, 1); + const reordered = vm.reorderSound(spriteId, 1, 0); + t.equal(reordered, true); t.equal(projectChanged, true); t.end(); });