Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit b7ed19b

Browse files
chakrabotkfarnung
authored andcommitted
meta: merge node/master into node-chakracore/master
Merge f25104e as of 2018-02-16 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2 parents ab47a18 + f25104e commit b7ed19b

File tree

180 files changed

+1249
-1598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+1249
-1598
lines changed

.eslintrc.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ rules:
7474
message: __defineSetter__ is deprecated.
7575
no-return-await: error
7676
no-self-assign: error
77+
no-self-compare: error
7778
no-throw-literal: error
7879
no-unused-labels: error
7980
no-useless-call: error
@@ -135,8 +136,11 @@ rules:
135136
no-mixed-spaces-and-tabs: error
136137
no-multiple-empty-lines: [error, {max: 2, maxEOF: 0, maxBOF: 0}]
137138
no-restricted-syntax: [error, {
139+
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
140+
message: "Please replace `assert.doesNotThrow()` and add a comment next to the code instead."
141+
}, {
138142
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
139-
message: "use a regular expression for second argument of assert.throws()"
143+
message: "Use a regular expression for second argument of assert.throws()"
140144
}, {
141145
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]",
142146
message: "assert.throws() must be invoked with at least two arguments."
@@ -152,6 +156,7 @@ rules:
152156
}]
153157
no-tabs: error
154158
no-trailing-spaces: error
159+
no-unsafe-finally: error
155160
object-curly-spacing: [error, always]
156161
one-var-declaration-per-line: error
157162
operator-linebreak: [error, after]

benchmark/assert/throws.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function main({ n, method }) {
2626
case 'doesNotThrow':
2727
bench.start();
2828
for (i = 0; i < n; ++i) {
29+
// eslint-disable-next-line no-restricted-syntax
2930
assert.doesNotThrow(doesNotThrow);
3031
}
3132
bench.end(n);

doc/api/assert.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ to the caller.
341341
The following, for instance, will throw the [`TypeError`][] because there is no
342342
matching error type in the assertion:
343343

344+
<!-- eslint-disable no-restricted-syntax -->
344345
```js
345346
assert.doesNotThrow(
346347
() => {
@@ -353,6 +354,7 @@ assert.doesNotThrow(
353354
However, the following will result in an `AssertionError` with the message
354355
'Got unwanted exception (TypeError)..':
355356

357+
<!-- eslint-disable no-restricted-syntax -->
356358
```js
357359
assert.doesNotThrow(
358360
() => {
@@ -366,6 +368,7 @@ If an `AssertionError` is thrown and a value is provided for the `message`
366368
parameter, the value of `message` will be appended to the `AssertionError`
367369
message:
368370

371+
<!-- eslint-disable no-restricted-syntax -->
369372
```js
370373
assert.doesNotThrow(
371374
() => {

0 commit comments

Comments
 (0)