Skip to content

Commit f9b5149

Browse files
committed
disable prettier for a single block, since it seems to mess up tests that rely on string comparison of functions
1 parent 1786964 commit f9b5149

File tree

2 files changed

+12
-8
lines changed
  • apps

2 files changed

+12
-8
lines changed

apps/src/flappy/levels.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,13 @@ module.exports = {
318318
[
319319
{
320320
test: function test(block) {
321-
return (
322-
(block.type === 'flappy_setBackground' ||
321+
// for some reason, formatting this method with prettier causes the
322+
// associated integration test to fail
323+
/* eslint-disable prettier/prettier */
324+
return (block.type === 'flappy_setBackground' ||
323325
block.type === 'flappy_setPlayer') &&
324-
block.getTitleValue('VALUE') === 'random'
325-
);
326+
block.getTitleValue('VALUE') === 'random';
327+
/* eslint-enable prettier/prettier */
326328
},
327329
type: 'flappy_setBackground',
328330
titles: {

apps/test/integration/levelSolutions/flappy/8.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
var setRandomBackgroundRequiredBlock = {
22
test: function test(block) {
3-
return (
4-
(block.type === 'flappy_setBackground' ||
3+
// for some reason, formatting this method with prettier causes the
4+
// associated integration test to fail
5+
/* eslint-disable prettier/prettier */
6+
return (block.type === 'flappy_setBackground' ||
57
block.type === 'flappy_setPlayer') &&
6-
block.getTitleValue('VALUE') === 'random'
7-
);
8+
block.getTitleValue('VALUE') === 'random';
9+
/* eslint-enable prettier/prettier */
810
},
911
type: 'flappy_setBackground',
1012
titles: {

0 commit comments

Comments
 (0)