From 0af6bc4b012a4e6c5c6cffc4e2e53e552ad480f3 Mon Sep 17 00:00:00 2001 From: Monica Kozbial <6621618+moniika@users.noreply.github.com> Date: Tue, 13 Jul 2021 13:13:06 -0700 Subject: [PATCH] Remove unused parameters from test helpers (#5032) --- tests/mocha/gesture_test.js | 2 +- tests/mocha/keydown_test.js | 2 +- tests/mocha/test_helpers.js | 8 ++++---- tests/mocha/theme_test.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/mocha/gesture_test.js b/tests/mocha/gesture_test.js index 7cf114633..ba77a27d1 100644 --- a/tests/mocha/gesture_test.js +++ b/tests/mocha/gesture_test.js @@ -45,7 +45,7 @@ suite('Gesture', function() { setup(function() { sharedTestSetup.call(this); - defineBasicBlockWithField(this.sharedCleanup); + defineBasicBlockWithField(); var toolbox = document.getElementById('gesture-test-toolbox'); this.workspace = Blockly.inject('blocklyDiv', {toolbox: toolbox}); }); diff --git a/tests/mocha/keydown_test.js b/tests/mocha/keydown_test.js index d989d9614..aec646111 100644 --- a/tests/mocha/keydown_test.js +++ b/tests/mocha/keydown_test.js @@ -18,7 +18,7 @@ suite('Key Down', function() { * @param {Blockly.Workspace} workspace The workspace to create a new block on. */ function setSelectedBlock(workspace) { - defineStackBlock(this.sharedCleanup); + defineStackBlock(); Blockly.selected = workspace.newBlock('stack_block'); } diff --git a/tests/mocha/test_helpers.js b/tests/mocha/test_helpers.js index 426929dfb..106991955 100644 --- a/tests/mocha/test_helpers.js +++ b/tests/mocha/test_helpers.js @@ -456,7 +456,7 @@ function assertNthCallEventArgEquals(spy, n, instanceType, expectedProperties, assertXmlProperties_(eventArg, xmlProperties); } -function defineStackBlock(sharedCleanupObj) { +function defineStackBlock() { Blockly.defineBlocksWithJsonArray([{ "type": "stack_block", "message0": "", @@ -465,7 +465,7 @@ function defineStackBlock(sharedCleanupObj) { }]); } -function defineRowBlock(sharedCleanupObj) { +function defineRowBlock() { Blockly.defineBlocksWithJsonArray([{ "type": "row_block", "message0": "%1", @@ -479,7 +479,7 @@ function defineRowBlock(sharedCleanupObj) { }]); } -function defineStatementBlock(sharedCleanupObj) { +function defineStatementBlock() { Blockly.defineBlocksWithJsonArray([{ "type": "statement_block", "message0": "%1", @@ -496,7 +496,7 @@ function defineStatementBlock(sharedCleanupObj) { "helpUrl": "" }]); } -function defineBasicBlockWithField(sharedCleanupObj) { +function defineBasicBlockWithField() { Blockly.defineBlocksWithJsonArray([{ "type": "test_field_block", "message0": "%1", diff --git a/tests/mocha/theme_test.js b/tests/mocha/theme_test.js index d8fcc7664..f9a8cae22 100644 --- a/tests/mocha/theme_test.js +++ b/tests/mocha/theme_test.js @@ -20,7 +20,7 @@ suite('Theme', function() { Blockly.registry.typeMap_['theme'] = {}; }); - function defineThemeTestBlocks(sharedCleanupObj) { + function defineThemeTestBlocks() { Blockly.defineBlocksWithJsonArray([{ "type": "stack_block", "message0": "", @@ -117,7 +117,7 @@ suite('Theme', function() { }); test('Set Theme', function() { - defineThemeTestBlocks(this.sharedCleanup); + defineThemeTestBlocks(); try { var blockStyles = createBlockStyles(); var theme = new Blockly.Theme('themeName', blockStyles);