chore: apply prefer-const rule fixes in mocha tests (#5682)

This commit is contained in:
Rachel Fenichel
2021-11-05 14:25:33 -07:00
committed by GitHub
parent 6448528e9a
commit 1ebec55393
58 changed files with 2147 additions and 2146 deletions

View File

@@ -10,7 +10,7 @@ const {assertWarnings, sharedTestSetup, sharedTestTeardown} = goog.require('Bloc
suite('Registry', function() {
let TestClass = function() {};
const TestClass = function() {};
TestClass.prototype.testMethod = function() {
return 'something';
};
@@ -238,19 +238,19 @@ suite('Registry', function() {
});
test('Simple - Plugin name given', function() {
let testClass = Blockly.registry.getClassFromOptions('test', this.options);
const testClass = Blockly.registry.getClassFromOptions('test', this.options);
chai.assert.instanceOf(new testClass(), TestClass);
});
test('Simple - Plugin class given', function() {
this.options.plugins['test'] = TestClass;
let testClass = Blockly.registry.getClassFromOptions('test', this.options);
const testClass = Blockly.registry.getClassFromOptions('test', this.options);
chai.assert.instanceOf(new testClass(), TestClass);
});
test('No Plugin Name Given', function() {
delete this.options['plugins']['test'];
let testClass = Blockly.registry.getClassFromOptions('test', this.options);
const testClass = Blockly.registry.getClassFromOptions('test', this.options);
chai.assert.instanceOf(new testClass(), this.defaultClass);
});