Migrate some more code to ES6 (4).

Review Request #10454 — Created March 20, 2019 and submitted

david
Review Board
release-4.0.x
reviewboard

This change converts test code inside the resources/ directory to ES6.

Ran js-tests.

Summary
Migrate some more code to ES6 (4).
Description From Last Updated

Col: 9 Expected an assignment or function call and instead saw an expression.

reviewbotreviewbot

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

For Jasmine, this should be preserved. It represents the text content. We don't want to use fat arrow functions in ...

chipx86chipx86

Can you put parens around the calculations? It'll help with readability here.

chipx86chipx86

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

This line's too long now.

chipx86chipx86

This line's too long now.

chipx86chipx86

This should be function() {

chipx86chipx86

function()

chipx86chipx86

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot
Checks run (2 failed)
flake8 failed.
JSHint failed.

flake8

JSHint

david
Review request changed
chipx86
  1. 
      
  2. For Jasmine, this should be preserved. It represents the text content. We don't want to use fat arrow functions in any call to suite(), beforeEach(), it(), describe(), etc.

  3. Can you put parens around the calculations? It'll help with readability here.

  4. 
      
david
Review request changed
chipx86
  1. Looks pretty good. Just a few small things from the undoing of () =>.

  2. 
      
david
Review request changed
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (1b452f5)
Loading...