From dc912c63adc6ae3fd6fdd32b043d1af7564ebfe1 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Thu, 4 Jun 2020 18:10:40 -0700 Subject: [PATCH] Fix mocha tests --- tests/mocha/block_test.js | 2 ++ tests/mocha/theme_test.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index 08f11a84b..3375c57bb 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -1657,6 +1657,8 @@ suite('Blocks', function() { }); teardown(function() { this.workspace.dispose(); + // Clear all registered themes. + Blockly.registry.typeMap_['theme'] = {}; }); test('Set colour hue', function() { this.block.setColour('20'); diff --git a/tests/mocha/theme_test.js b/tests/mocha/theme_test.js index d9c15d709..3e7c18a8f 100644 --- a/tests/mocha/theme_test.js +++ b/tests/mocha/theme_test.js @@ -11,6 +11,10 @@ 'use strict'; suite('Theme', function() { + teardown(function() { + // Clear all registered themes. + Blockly.registry.typeMap_['theme'] = {}; + }); function defineThemeTestBlocks() { Blockly.defineBlocksWithJsonArray([{