Update unit tests to not use fat arrow functions for Jasmine methods.

Review Request #11010 — Created May 6, 2020 and submitted

Information

Djblets
release-2.0.x

Reviewers

When we first moved the codebase to ES6, we were using fat arrow
functions in calls to suite(), describe(), it(), and
beforeEach(), which appeared to make sense at the time. However,
Jasmine actually intentionally provides an explicit this value used
for test context. We don't really use it in practice, but we don't want
to override it, and we're not supposed to be passing in fat arrow
functions to any of these calls.

This change simply replaces all => { ... } in Jasmine calls with
function() { ... }.

Unit tests pass.

Summary ID
Update unit tests to not use fat arrow functions for Jasmine methods.
When we first moved the codebase to ES6, we were using fat arrow functions in calls to `suite()`, `describe()`, `it()`, and `beforeEach()`, which appeared to make sense at the time. However, Jasmine actually intentionally provides an explicit `this` value used for test context. We don't really use it in practice, but we don't want to override it, and we're not supposed to be passing in fat arrow functions to any of these calls. This change simply replaces all `=> { ... }` in Jasmine calls with `function() { ... }`.
86ef6747465ec5603e6b100e2a5685a3a11e7f44
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (687ead5)
Loading...