From 6dd5428e5bdc7f9ba8afef6088a25fedbd723b29 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 5 Aug 2020 19:58:23 -0700 Subject: [PATCH 1/5] Add and use helper functions in block_test.js --- tests/mocha/block_test.js | 115 ++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 68 deletions(-) diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index 3581febac..3eb941d7a 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -424,19 +424,24 @@ suite('Blocks', function() { }); suite('Deserialization', function() { + setup() { + this.deserializationHelper = function(text) { + let dom = Blockly.Xml.textToDom(text); + Blockly.Xml.appendDomToWorkspace(dom, this.workspace); + this.assertConnectionsEmpty(); + this.clock.runAll(); + } + } test('Stack', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + - '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ''); chai.assert.equal(this.getPrevious().length, 1); chai.assert.equal(this.getNext().length, 1); }); test('Multi-Stack', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -448,25 +453,21 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 3); chai.assert.equal(this.getNext().length, 3); }); test('Collapsed Stack', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 1); chai.assert.equal(this.getNext().length, 1); }); test('Collapsed Multi-Stack', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -478,25 +479,21 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 3); chai.assert.equal(this.getNext().length, 3); }); test('Row', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getOutputs().length, 1); chai.assert.equal(this.getInputs().length, 1); }); test('Multi-Row', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -508,25 +505,21 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getOutputs().length, 3); chai.assert.equal(this.getInputs().length, 3); }); test('Collapsed Row', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getOutputs().length, 1); chai.assert.equal(this.getInputs().length, 0); }); test('Collapsed Multi-Row', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -538,9 +531,7 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getOutputs().length, 1); chai.assert.equal(this.getInputs().length, 0); }); @@ -564,18 +555,16 @@ suite('Blocks', function() { chai.assert.equal(this.getInputs().length, 1); }); test('Statement', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 1); chai.assert.equal(this.getNext().length, 2); }); test('Multi-Statement', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -587,25 +576,21 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 3); chai.assert.equal(this.getNext().length, 6); }); test('Collapsed Statement', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 1); chai.assert.equal(this.getNext().length, 1); }); test('Collapsed Multi-Statement', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -617,14 +602,12 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 1); chai.assert.equal(this.getNext().length, 1); }); test('Collapsed Multi-Statement Middle', function() { - Blockly.Xml.appendDomToWorkspace(Blockly.Xml.textToDom( + this.deserializationHelper( '' + ' ' + ' ' + @@ -636,9 +619,7 @@ suite('Blocks', function() { ' ' + ' ' + '' - ), this.workspace); - this.assertConnectionsEmpty(); - this.clock.runAll(); + ); chai.assert.equal(this.getPrevious().length, 2); chai.assert.equal(this.getNext().length, 3); }); @@ -917,10 +898,16 @@ suite('Blocks', function() { }); }); suite('Remove Connections Programmatically', function() { + setup() { + this.makeBlock = function(type) { + var block = this.workspace.newBlock(type); + block.initSvg(); + block.render(); + return block; + } + } test('Output', function() { - var block = this.workspace.newBlock('row_block'); - block.initSvg(); - block.render(); + var block = this.makeBlock('row_block'); block.setOutput(false); @@ -928,9 +915,7 @@ suite('Blocks', function() { chai.assert.equal(this.getInputs().length, 1); }); test('Value', function() { - var block = this.workspace.newBlock('row_block'); - block.initSvg(); - block.render(); + var block = this.makeBlock('row_block'); block.removeInput('INPUT'); @@ -938,9 +923,7 @@ suite('Blocks', function() { chai.assert.equal(this.getInputs().length, 0); }); test('Previous', function() { - var block = this.workspace.newBlock('stack_block'); - block.initSvg(); - block.render(); + var block = this.makeBlock('stack_block'); block.setPreviousStatement(false); @@ -948,9 +931,7 @@ suite('Blocks', function() { chai.assert.equal(this.getNext().length, 1); }); test('Next', function() { - var block = this.workspace.newBlock('stack_block'); - block.initSvg(); - block.render(); + var block = this.makeBlock('stack_block'); block.setNextStatement(false); @@ -958,9 +939,7 @@ suite('Blocks', function() { chai.assert.equal(this.getNext().length, 0); }); test('Statement', function() { - var block = this.workspace.newBlock('statement_block'); - block.initSvg(); - block.render(); + var block = this.makeBlock('statement_block'); block.removeInput('STATEMENT'); From 3a7a636d2828beefb6041853c94db451711dd241 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 5 Aug 2020 20:33:34 -0700 Subject: [PATCH 2/5] Move createRenderedBlock to test helpers, fix setup, use helper in more places --- tests/mocha/block_test.js | 141 ++++++++++++++++-------------------- tests/mocha/test_helpers.js | 7 ++ 2 files changed, 71 insertions(+), 77 deletions(-) diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index 3eb941d7a..f12d1266b 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -424,14 +424,14 @@ suite('Blocks', function() { }); suite('Deserialization', function() { - setup() { + setup(function() { this.deserializationHelper = function(text) { let dom = Blockly.Xml.textToDom(text); Blockly.Xml.appendDomToWorkspace(dom, this.workspace); this.assertConnectionsEmpty(); this.clock.runAll(); - } - } + }; + }); test('Stack', function() { this.deserializationHelper( '' + @@ -898,16 +898,8 @@ suite('Blocks', function() { }); }); suite('Remove Connections Programmatically', function() { - setup() { - this.makeBlock = function(type) { - var block = this.workspace.newBlock(type); - block.initSvg(); - block.render(); - return block; - } - } test('Output', function() { - var block = this.makeBlock('row_block'); + var block = createRenderedBlock(this.workspace, 'row_block'); block.setOutput(false); @@ -915,7 +907,7 @@ suite('Blocks', function() { chai.assert.equal(this.getInputs().length, 1); }); test('Value', function() { - var block = this.makeBlock('row_block'); + var block = createRenderedBlock(this.workspace, 'row_block'); block.removeInput('INPUT'); @@ -923,7 +915,7 @@ suite('Blocks', function() { chai.assert.equal(this.getInputs().length, 0); }); test('Previous', function() { - var block = this.makeBlock('stack_block'); + var block = createRenderedBlock(this.workspace, 'stack_block'); block.setPreviousStatement(false); @@ -931,7 +923,7 @@ suite('Blocks', function() { chai.assert.equal(this.getNext().length, 1); }); test('Next', function() { - var block = this.makeBlock('stack_block'); + var block = createRenderedBlock(this.workspace, 'stack_block'); block.setNextStatement(false); @@ -939,7 +931,7 @@ suite('Blocks', function() { chai.assert.equal(this.getNext().length, 0); }); test('Statement', function() { - var block = this.makeBlock('statement_block'); + var block = createRenderedBlock(this.workspace, 'statement_block'); block.removeInput('STATEMENT'); @@ -949,9 +941,10 @@ suite('Blocks', function() { }); suite('Add Connections Programmatically', function() { test('Output', function() { - var block = this.workspace.newBlock('empty_block'); - block.initSvg(); - block.render(); + var block = createRenderedBlock(this.workspace, 'empty_block'); + // this.workspace.newBlock('empty_block'); + // block.initSvg(); + // block.render(); block.setOutput(true); @@ -1238,12 +1231,6 @@ suite('Blocks', function() { ], } ]); - this.createBlock = function(type) { - var block = this.workspace.newBlock(type); - block.initSvg(); - block.render(); - return block; - }; }); teardown(function() { Blockly.Events.enable(); @@ -1251,8 +1238,8 @@ suite('Blocks', function() { }); suite('Connecting and Disconnecting', function() { test('Connect Block to Next', function() { - var blockA = this.createBlock('stack_block'); - var blockB = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'stack_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1260,8 +1247,8 @@ suite('Blocks', function() { assertNotCollapsed(blockB); }); test('Connect Block to Value Input', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1272,8 +1259,8 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockB)); }); test('Connect Block to Statement Input', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1285,9 +1272,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockB)); }); test('Connect Block to Child of Collapsed - Input', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); - var blockC = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); + var blockC = createRenderedBlock(this.workspace,'row_block'); blockA.getInput('INPUT').connection.connect(blockB.outputConnection); blockA.setCollapsed(true); @@ -1302,9 +1289,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Connect Block to Child of Collapsed - Next', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); - var blockC = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); + var blockC = createRenderedBlock(this.workspace,'stack_block'); blockA.getInput('STATEMENT').connection .connect(blockB.previousConnection); @@ -1320,9 +1307,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Connect Block to Value Input Already Taken', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); - var blockC = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); + var blockC = createRenderedBlock(this.workspace,'row_block'); blockA.getInput('INPUT').connection.connect(blockB.outputConnection); blockA.setCollapsed(true); @@ -1339,9 +1326,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Connect Block to Statement Input Already Taken', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); - var blockC = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); + var blockC = createRenderedBlock(this.workspace,'stack_block'); blockA.getInput('STATEMENT').connection .connect(blockB.previousConnection); @@ -1360,9 +1347,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Connect Block with Child - Input', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); - var blockC = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); + var blockC = createRenderedBlock(this.workspace,'row_block'); blockB.getInput('INPUT').connection.connect(blockC.outputConnection); blockA.setCollapsed(true); @@ -1377,9 +1364,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Connect Block with Child - Statement', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); - var blockC = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); + var blockC = createRenderedBlock(this.workspace,'stack_block'); blockB.nextConnection.connect(blockC.previousConnection); blockA.setCollapsed(true); @@ -1395,8 +1382,8 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Disconnect Block from Value Input', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); blockA.getInput('INPUT').connection.connect(blockB.outputConnection); blockA.setCollapsed(true); @@ -1406,8 +1393,8 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockB)); }); test('Disconnect Block from Statement Input', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); blockA.getInput('STATEMENT').connection .connect(blockB.previousConnection); @@ -1418,9 +1405,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockB)); }); test('Disconnect Block from Child of Collapsed - Input', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); - var blockC = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); + var blockC = createRenderedBlock(this.workspace,'row_block'); blockA.getInput('INPUT').connection.connect(blockB.outputConnection); blockB.getInput('INPUT').connection.connect(blockC.outputConnection); @@ -1433,9 +1420,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Disconnect Block from Child of Collapsed - Next', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); - var blockC = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); + var blockC = createRenderedBlock(this.workspace,'stack_block'); blockA.getInput('STATEMENT').connection .connect(blockB.previousConnection); @@ -1449,9 +1436,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Disconnect Block with Child - Input', function() { - var blockA = this.createBlock('row_block'); - var blockB = this.createBlock('row_block'); - var blockC = this.createBlock('row_block'); + var blockA = createRenderedBlock(this.workspace,'row_block'); + var blockB = createRenderedBlock(this.workspace,'row_block'); + var blockC = createRenderedBlock(this.workspace,'row_block'); blockB.getInput('INPUT').connection.connect(blockC.outputConnection); blockA.getInput('INPUT').connection.connect(blockB.outputConnection); @@ -1465,9 +1452,9 @@ suite('Blocks', function() { chai.assert.isFalse(isBlockHidden(blockC)); }); test('Disconnect Block with Child - Statement', function() { - var blockA = this.createBlock('statement_block'); - var blockB = this.createBlock('stack_block'); - var blockC = this.createBlock('stack_block'); + var blockA = createRenderedBlock(this.workspace,'statement_block'); + var blockB = createRenderedBlock(this.workspace,'stack_block'); + var blockC = createRenderedBlock(this.workspace,'stack_block'); blockB.nextConnection.connect(blockC.previousConnection); blockA.getInput('STATEMENT').connection @@ -1484,7 +1471,7 @@ suite('Blocks', function() { }); suite('Adding and Removing Block Parts', function() { test('Add Previous Connection', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setCollapsed(true); assertCollapsed(blockA); blockA.setPreviousStatement(true); @@ -1492,7 +1479,7 @@ suite('Blocks', function() { chai.assert.isNotNull(blockA.previousConnection); }); test('Add Next Connection', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setCollapsed(true); assertCollapsed(blockA); blockA.setNextStatement(true); @@ -1500,7 +1487,7 @@ suite('Blocks', function() { chai.assert.isNotNull(blockA.nextConnection); }); test('Add Input', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setCollapsed(true); assertCollapsed(blockA); blockA.appendDummyInput('NAME'); @@ -1508,7 +1495,7 @@ suite('Blocks', function() { chai.assert.isNotNull(blockA.getInput('NAME')); }); test('Add Field', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); var input = blockA.appendDummyInput('NAME'); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1519,14 +1506,14 @@ suite('Blocks', function() { chai.assert.equal(field.getText(), 'test'); }); test('Add Icon', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setCollapsed(true); assertCollapsed(blockA); blockA.setCommentText('test'); assertCollapsed(blockA); }); test('Remove Previous Connection', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setPreviousStatement(true); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1535,7 +1522,7 @@ suite('Blocks', function() { chai.assert.isNull(blockA.previousConnection); }); test('Remove Next Connection', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setNextStatement(true); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1544,7 +1531,7 @@ suite('Blocks', function() { chai.assert.isNull(blockA.nextConnection); }); test('Remove Input', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.appendDummyInput('NAME'); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1553,7 +1540,7 @@ suite('Blocks', function() { chai.assert.isNull(blockA.getInput('NAME')); }); test('Remove Field', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); var input = blockA.appendDummyInput('NAME'); input.appendField(new Blockly.FieldLabel('test'), 'FIELD'); blockA.setCollapsed(true); @@ -1564,7 +1551,7 @@ suite('Blocks', function() { chai.assert.isNull(field); }); test('Remove Icon', function() { - var blockA = this.createBlock('empty_block'); + var blockA = createRenderedBlock(this.workspace,'empty_block'); blockA.setCommentText('test'); blockA.setCollapsed(true); assertCollapsed(blockA); @@ -1574,7 +1561,7 @@ suite('Blocks', function() { }); suite('Renaming Vars', function() { test('Simple Rename', function() { - var blockA = this.createBlock('variable_block'); + var blockA = createRenderedBlock(this.workspace,'variable_block'); blockA.setCollapsed(true); assertCollapsed(blockA, 'x'); @@ -1584,7 +1571,7 @@ suite('Blocks', function() { assertCollapsed(blockA, 'y'); }); test('Coalesce, Different Case', function() { - var blockA = this.createBlock('variable_block'); + var blockA = createRenderedBlock(this.workspace,'variable_block'); blockA.setCollapsed(true); assertCollapsed(blockA, 'x'); diff --git a/tests/mocha/test_helpers.js b/tests/mocha/test_helpers.js index fda3aef1d..d0fb39de7 100644 --- a/tests/mocha/test_helpers.js +++ b/tests/mocha/test_helpers.js @@ -291,3 +291,10 @@ function createTestBlock() { } }; } + +function createRenderedBlock(workspaceSvg, type) { + var block = workspaceSvg.newBlock(type); + block.initSvg(); + block.render(); + return block; +} From 6f0dddc2faa65b4ef40236261b69decc13903747 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 6 Aug 2020 10:20:16 -0700 Subject: [PATCH 3/5] Add createRenderedBlock to eslint globals --- tests/mocha/.eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/mocha/.eslintrc.json b/tests/mocha/.eslintrc.json index 7606fd3b2..80da5f108 100644 --- a/tests/mocha/.eslintrc.json +++ b/tests/mocha/.eslintrc.json @@ -14,6 +14,7 @@ "assertVariableValues": true, "captureWarnings": true, "createTestBlock": true, + "createRenderedBlock": true, "defineRowBlock": true, "defineStackBlock": true, "defineStatementBlock": true, From ecb8739c5faf894de79da8932df02ee3d736b961 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 6 Aug 2020 10:30:04 -0700 Subject: [PATCH 4/5] Lint --- tests/mocha/block_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index f12d1266b..a120fb0ad 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -564,7 +564,7 @@ suite('Blocks', function() { chai.assert.equal(this.getNext().length, 2); }); test('Multi-Statement', function() { - this.deserializationHelper( + this.deserializationHelper( '' + ' ' + ' ' + From 3922bd30c2726cf96c3a92891146d7828011a504 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 6 Aug 2020 11:47:20 -0700 Subject: [PATCH 5/5] Alphabetize --- tests/mocha/.eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mocha/.eslintrc.json b/tests/mocha/.eslintrc.json index 80da5f108..00e701005 100644 --- a/tests/mocha/.eslintrc.json +++ b/tests/mocha/.eslintrc.json @@ -13,8 +13,8 @@ "assertNthCallEventArgEquals": true, "assertVariableValues": true, "captureWarnings": true, - "createTestBlock": true, "createRenderedBlock": true, + "createTestBlock": true, "defineRowBlock": true, "defineStackBlock": true, "defineStatementBlock": true,