diff --git a/tests/mocha/registry_test.js b/tests/mocha/registry_test.js index 44c941a29..f4171197c 100644 --- a/tests/mocha/registry_test.js +++ b/tests/mocha/registry_test.js @@ -84,8 +84,13 @@ suite('Registry', function() { }); test('Incorrect Plugin Name', function() { this.options['plugins']['test'] = 'random'; - var testClass = Blockly.registry.getClassFromOptions('test', this.options); + var testClass; + var warnings = captureWarnings(() => { + testClass = Blockly.registry.getClassFromOptions('test', this.options); + }); chai.assert.isNull(testClass); + chai.assert.equal(warnings.length, 1, + 'Expecting 1 warning about no name "random" found.'); }); }); });