Skip to content

Commit

Permalink
doc: restrict the ES.Next features usage in tests
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#11452
Refs: nodejs/node#11290
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
DavidCai1111 committed Mar 8, 2017
1 parent 4f9e4b4 commit 67f563b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/guides/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,12 @@ assert.throws(

For performance considerations, we only use a selected subset of ES.Next
features in JavaScript code in the `lib` directory. However, when writing
tests, it is encouraged to use ES.Next features that have already landed
in the ECMAScript specification. For example:
tests, for the ease of backporting, it is encouraged to use those ES.Next
features that can be used directly without a flag in [all maintained branches]
(https://github.com/nodejs/lts), you can check [node.green](http://node.green)
for all available features in each release.

For example:

* `let` and `const` over `var`
* Template literals over string concatenation
Expand Down

0 comments on commit 67f563b

Please sign in to comment.