<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/test/parallel/test-assert.js, branch Remove-Python-3-tests</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>assert: avoid potentially misleading reference to object identity</title>
<updated>2019-07-26T05:36:29+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-07-23T18:38:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=64e4b0c0ac5073e6606b1ccd79a464f2c5925741'/>
<id>64e4b0c0ac5073e6606b1ccd79a464f2c5925741</id>
<content type='text'>
Often, the word “identical” when referring to JS objects will
be read as referring to having the same object identity (which is
called “reference equality” here), but what the error message is
trying to say here is that the objects are different but yield the
same `util.inspect()` output.

Since `util.inspect()` output represents the structure rather than
the identity of objects, (hopefully) clarify the error message to
reflect that.

PR-URL: https://github.com/nodejs/node/pull/28824
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Often, the word “identical” when referring to JS objects will
be read as referring to having the same object identity (which is
called “reference equality” here), but what the error message is
trying to say here is that the objects are different but yield the
same `util.inspect()` output.

Since `util.inspect()` output represents the structure rather than
the identity of objects, (hopefully) clarify the error message to
reflect that.

PR-URL: https://github.com/nodejs/node/pull/28824
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: add test to doesNotThrow; validate if actual with regex</title>
<updated>2019-07-01T22:40:07+00:00</updated>
<author>
<name>estrada9166</name>
<email>estrada9166@hotmail.com</email>
</author>
<published>2019-06-24T03:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=367ada49f192d9767d80701786d44f648e4b9a9d'/>
<id>367ada49f192d9767d80701786d44f648e4b9a9d</id>
<content type='text'>
Refs: https://coverage.nodejs.org/coverage-1a4f27ae21698d0c/lib/assert.js.html#L736

PR-URL: https://github.com/nodejs/node/pull/28355
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs: https://coverage.nodejs.org/coverage-1a4f27ae21698d0c/lib/assert.js.html#L736

PR-URL: https://github.com/nodejs/node/pull/28355
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: add tests to assert.ok and improve coverage</title>
<updated>2019-07-01T22:40:01+00:00</updated>
<author>
<name>estrada9166</name>
<email>estrada9166@hotmail.com</email>
</author>
<published>2019-06-21T21:55:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=6e9d79564234919b656a92da3e0ac3bc8a49bc2c'/>
<id>6e9d79564234919b656a92da3e0ac3bc8a49bc2c</id>
<content type='text'>
Refs: https://coverage.nodejs.org/coverage-1a4f27ae21698d0c/lib/assert.js.html#L364

PR-URL: https://github.com/nodejs/node/pull/28355
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs: https://coverage.nodejs.org/coverage-1a4f27ae21698d0c/lib/assert.js.html#L364

PR-URL: https://github.com/nodejs/node/pull/28355
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: check custom inspection truncation in assert</title>
<updated>2019-06-18T18:16:26+00:00</updated>
<author>
<name>Rich Trott</name>
<email>rtrott@gmail.com</email>
</author>
<published>2019-06-14T22:19:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e3d5257ec3dbb7b21ed2b972d6e6000ffe71084d'/>
<id>e3d5257ec3dbb7b21ed2b972d6e6000ffe71084d</id>
<content type='text'>
The assert module has some truncation logic in a custom inspect
function. This was not covered in tests. Add tests to cover it.

PR-URL: https://github.com/nodejs/node/pull/28234
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The assert module has some truncation logic in a custom inspect
function. This was not covered in tests. Add tests to cover it.

PR-URL: https://github.com/nodejs/node/pull/28234
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: add partial support for evaluated code in simple assert</title>
<updated>2019-06-13T03:02:50+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-20T10:56:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1a0fd6027759296e66b691f9c4e841c69b8eb995'/>
<id>1a0fd6027759296e66b691f9c4e841c69b8eb995</id>
<content type='text'>
This makes sure using `assert.ok()` in `new Function()` statements
visualizes the actual call site in the error message.

PR-URL: https://github.com/nodejs/node/pull/27781
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure using `assert.ok()` in `new Function()` statements
visualizes the actual call site in the error message.

PR-URL: https://github.com/nodejs/node/pull/27781
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: improve regular expression validation</title>
<updated>2019-06-13T03:02:48+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-19T21:23:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=4a3af65a88122307a86b28bf385b8f87767803e6'/>
<id>4a3af65a88122307a86b28bf385b8f87767803e6</id>
<content type='text'>
This makes sure `assert.throws()` and `assert.rejects()` result in
an easy to understand error message instead of rethrowing the actual
error. This should significantly improve the debugging experience in
case people use an regular expression to validate their errors.

This also adds support for primitive errors that would have caused
runtime errors using the mentioned functions. The input is now
stringified before it's passed to the RegExp to circumvent that.

As drive-by change this also adds some further comments and renames
a variable for clarity.

PR-URL: https://github.com/nodejs/node/pull/27781
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure `assert.throws()` and `assert.rejects()` result in
an easy to understand error message instead of rethrowing the actual
error. This should significantly improve the debugging experience in
case people use an regular expression to validate their errors.

This also adds support for primitive errors that would have caused
runtime errors using the mentioned functions. The input is now
stringified before it's passed to the RegExp to circumvent that.

As drive-by change this also adds some further comments and renames
a variable for clarity.

PR-URL: https://github.com/nodejs/node/pull/27781
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: print more lines in the error diff</title>
<updated>2019-06-13T02:50:03+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-06-03T14:05:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=81496567e76006a7d07a8552215fc6333c183480'/>
<id>81496567e76006a7d07a8552215fc6333c183480</id>
<content type='text'>
So far consequitive identical lines were collapsed if there were at
least three. Now they are only collapsed from five identical lines on.

This also simplifies the implementation a tiny bit by abstracting some
logic.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far consequitive identical lines were collapsed if there were at
least three. Now they are only collapsed from five identical lines on.

This also simplifies the implementation a tiny bit by abstracting some
logic.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>util: include reference anchor for circular structures</title>
<updated>2019-05-20T12:20:59+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-14T00:53:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=9f71dbc33466f26f3fa9a797ace8aa1f285cb890'/>
<id>9f71dbc33466f26f3fa9a797ace8aa1f285cb890</id>
<content type='text'>
This adds a reference anchor to circular structures when using
`util.inspect`. That way it's possible to identify with what object
the circular reference corresponds too.

PR-URL: https://github.com/nodejs/node/pull/27685
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a reference anchor to circular structures when using
`util.inspect`. That way it's possible to identify with what object
the circular reference corresponds too.

PR-URL: https://github.com/nodejs/node/pull/27685
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: add compatibility for older Node.js versions</title>
<updated>2019-05-16T10:52:49+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-13T12:17:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e632b1b7eeb0900472c710ae7269111d985de018'/>
<id>e632b1b7eeb0900472c710ae7269111d985de018</id>
<content type='text'>
This makes sure the `AssertionError` still accepts the
`stackStartFunction` option as alternative to the `stackStartFn`.

PR-URL: https://github.com/nodejs/node/pull/27672
Fixes: https://github.com/nodejs/node/issues/27671
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure the `AssertionError` still accepts the
`stackStartFunction` option as alternative to the `stackStartFn`.

PR-URL: https://github.com/nodejs/node/pull/27672
Fixes: https://github.com/nodejs/node/issues/27671
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: refine assertion message</title>
<updated>2019-05-05T21:44:19+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-01T21:52:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0cd602879c5e3f6a77adc2453f98b331421b2dbb'/>
<id>0cd602879c5e3f6a77adc2453f98b331421b2dbb</id>
<content type='text'>
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: https://github.com/nodejs/node/pull/27525
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: https://github.com/nodejs/node/pull/27525
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
