Skip to content

Commit

Permalink
fix(tests): Have blockToCodeTest clean up after itself
Browse files Browse the repository at this point in the history
Have the blockToCodeTest helper function delete the block generator
functions it adds to generator once the test is done.
  • Loading branch information
cpcallen committed Jun 13, 2023
1 parent 26067ce commit 862df95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/mocha/generator_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ suite('Generator', function () {
rowBlock.disabled = blockDisabled;

const code = generator.blockToCode(rowBlock, opt_thisOnly);
delete generator.forBlock['stack_block'];
delete generator.forBlock['row_block'];
chai.assert.equal(code, expectedCode, opt_message);
};
});
Expand Down

0 comments on commit 862df95

Please sign in to comment.