Skip to content

Commit

Permalink
test: refactor test-util-inspect.js
Browse files Browse the repository at this point in the history
* Enclose tests that used to introduce module-level variables into
  their own scopes.
* Replace ES5 anonymous functions with arrow functions where it makes
  sense.
* And make one arrow function a regular function thus fixing a bug in a
  getter inside an object created in "Array with dynamic properties"
  test.  This getter has never been invoked though, so the test hasn't been
  failing.
* Convert snake_case identifiers to camelCase.
* Make some variable names more readable.
* Replace regular expressions in maxArrayLength tests with simple
  assert.strictEquals() and assert(...endsWith()) checks, as suggested
  in <nodejs#11576 (comment)>.

PR-URL: nodejs#11779
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
aqrln authored and jungx098 committed Mar 21, 2017
1 parent 1c2da1f commit 4f35253
Showing 1 changed file with 322 additions and 281 deletions.
Loading

0 comments on commit 4f35253

Please sign in to comment.