<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/test/parallel/test-process-chdir.js, branch devsnek-patch-1</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>test: refactor common.expectsError</title>
<updated>2019-12-31T14:54:20+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-12-25T17:02:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e038d6a1cdb2ffbf666d360553c31786acaf70b2'/>
<id>e038d6a1cdb2ffbf666d360553c31786acaf70b2</id>
<content type='text'>
This completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.

The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.

This has the side effect that `common` is used significantly less
frequent.

PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@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 completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.

The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.

This has the side effect that `common` is used significantly less
frequent.

PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>process: improve cwd performance</title>
<updated>2019-04-26T16:43:11+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-04-14T15:34:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1d022e825356dfba9bef2d6f194b9e93d63b726d'/>
<id>1d022e825356dfba9bef2d6f194b9e93d63b726d</id>
<content type='text'>
This caches the current working directory and only updates the variable
if `process.chdir()` is called.

PR-URL: https://github.com/nodejs/node/pull/27224
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&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 caches the current working directory and only updates the variable
if `process.chdir()` is called.

PR-URL: https://github.com/nodejs/node/pull/27224
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: disallow constructor behaviour for native methods</title>
<updated>2019-03-21T11:14:26+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-03-16T12:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1935625df4f56bd77c57ec100a9222c77e9d440c'/>
<id>1935625df4f56bd77c57ec100a9222c77e9d440c</id>
<content type='text'>
Disallow constructor behaviour and setting up prototypes
for native methods that are not constructors (i.e. make
them behave like ES6 class methods).

PR-URL: https://github.com/nodejs/node/pull/26700
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disallow constructor behaviour and setting up prototypes
for native methods that are not constructors (i.e. make
them behave like ES6 class methods).

PR-URL: https://github.com/nodejs/node/pull/26700
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test,tools: enable running tests under workers</title>
<updated>2018-06-06T17:44:11+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-05-17T23:20:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=229dca3dee552f448dc9026237625ed58e8acfdc'/>
<id>229dca3dee552f448dc9026237625ed58e8acfdc</id>
<content type='text'>
Enable running tests inside workers by passing `--worker`
to `tools/test.py`. A number of tests are marked as skipped,
or have been slightly altered to fit the different environment.

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable running tests inside workers by passing `--worker`
to `tools/test.py`. A number of tests are marked as skipped,
or have been slightly altered to fit the different environment.

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>process: migrate methods to throw errors with code</title>
<updated>2018-04-26T17:42:55+00:00</updated>
<author>
<name>Michaël Zasso</name>
<email>targos@protonmail.com</email>
</author>
<published>2018-04-12T09:54:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2fd248f639981c72794efef397dfae5263ebdff5'/>
<id>2fd248f639981c72794efef397dfae5263ebdff5</id>
<content type='text'>
Migrate some methods from node.cc to JS in order to properly throw
errors with codes.

PR-URL: https://github.com/nodejs/node/pull/19973
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Migrate some methods from node.cc to JS in order to properly throw
errors with codes.

PR-URL: https://github.com/nodejs/node/pull/19973
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: move tmpdir to submodule of common</title>
<updated>2018-02-01T06:11:07+00:00</updated>
<author>
<name>Rich Trott</name>
<email>rtrott@gmail.com</email>
</author>
<published>2017-12-25T06:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=bf6ce47259ebfe9f6349c223cc1735726aee062d'/>
<id>bf6ce47259ebfe9f6349c223cc1735726aee062d</id>
<content type='text'>
Move tmpdir functionality to its own module (common/tmpdir).

PR-URL: https://github.com/nodejs/node/pull/17856
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gibson Fahnestock &lt;gibfahn@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move tmpdir functionality to its own module (common/tmpdir).

PR-URL: https://github.com/nodejs/node/pull/17856
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gibson Fahnestock &lt;gibfahn@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix RegExp nits</title>
<updated>2017-06-21T00:40:27+00:00</updated>
<author>
<name>Vse Mozhet Byt</name>
<email>vsemozhetbyt@gmail.com</email>
</author>
<published>2017-06-18T13:22:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=76340e3f1007998c7cb9d69fa1a42d42663ca6c2'/>
<id>76340e3f1007998c7cb9d69fa1a42d42663ca6c2</id>
<content type='text'>
* Remove needless RegExp flag

  In fixed case, `/g` flag is needless in the boolean context.

* Remove needless RegExp capturing

  Use non-capturing grouping or remove capturing completely when:

  * capturing is useless per se, e.g. in test() check;
  * captured groups are not used afterward at all;
  * some of the later captured groups are not used afterward.

* Use test, not match/exec in boolean context

  match() and exec() return a complicated object,
  unneeded in a boolean context.

* Do not needlessly repeat RegExp creation

  This commit takes RegExp creation out of cycles and other repetitions.

  As long as the RegExp does not use /g flag and match indices,
  we are safe here.

  In tests, this fix hardly gives a significant performance gain,
  but it increases clarity and maintainability,
  reassuring some RegExps to be identical.

  RegExp in functions are not taken out of their functions:
  while these functions are called many times
  and their RegExps are recreated with each call,
  the performance gain in test cases
  does not seem to be worth decreasing function self-dependency.

PR-URL: https://github.com/nodejs/node/pull/13770
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove needless RegExp flag

  In fixed case, `/g` flag is needless in the boolean context.

* Remove needless RegExp capturing

  Use non-capturing grouping or remove capturing completely when:

  * capturing is useless per se, e.g. in test() check;
  * captured groups are not used afterward at all;
  * some of the later captured groups are not used afterward.

* Use test, not match/exec in boolean context

  match() and exec() return a complicated object,
  unneeded in a boolean context.

* Do not needlessly repeat RegExp creation

  This commit takes RegExp creation out of cycles and other repetitions.

  As long as the RegExp does not use /g flag and match indices,
  we are safe here.

  In tests, this fix hardly gives a significant performance gain,
  but it increases clarity and maintainability,
  reassuring some RegExps to be identical.

  RegExp in functions are not taken out of their functions:
  while these functions are called many times
  and their RegExps are recreated with each call,
  the performance gain in test cases
  does not seem to be worth decreasing function self-dependency.

PR-URL: https://github.com/nodejs/node/pull/13770
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: make tests cwd-independent</title>
<updated>2017-05-05T11:39:48+00:00</updated>
<author>
<name>Vse Mozhet Byt</name>
<email>vsemozhetbyt@gmail.com</email>
</author>
<published>2017-05-03T15:10:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f1d593cda16dec18d56e76bedb11200d57e74e36'/>
<id>f1d593cda16dec18d56e76bedb11200d57e74e36</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/12812
Reviewed-By: Alexey Orlenko &lt;eaglexrlnk@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/12812
Reviewed-By: Alexey Orlenko &lt;eaglexrlnk@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: improve test-process-chdir</title>
<updated>2017-04-24T17:31:28+00:00</updated>
<author>
<name>vperezma</name>
<email>vperezma89@gmail.com</email>
</author>
<published>2017-04-22T18:15:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b968d584af9e569aeb1fdbc4399ff9752378b41f'/>
<id>b968d584af9e569aeb1fdbc4399ff9752378b41f</id>
<content type='text'>
remove typeError constructor and replace with regex string
to match typeError message

PR-URL: https://github.com/nodejs/node/pull/12589
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: David Cai &lt;davidcai1993@yahoo.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gibson Fahnestock &lt;gibfahn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
remove typeError constructor and replace with regex string
to match typeError message

PR-URL: https://github.com/nodejs/node/pull/12589
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: David Cai &lt;davidcai1993@yahoo.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gibson Fahnestock &lt;gibfahn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: use normalize() for unicode paths</title>
<updated>2015-10-06T16:10:49+00:00</updated>
<author>
<name>Roman Reiss</name>
<email>me@silverwind.io</email>
</author>
<published>2015-09-22T16:31:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=81e98e9363c918899f964a6e054a41a82c04dc1b'/>
<id>81e98e9363c918899f964a6e054a41a82c04dc1b</id>
<content type='text'>
OS X 10.11 changed the unicode normalization form of certain code points
returned by system calls like getcwd() from NFC to NFD which made
results in this test failing.

The consensus of https://github.com/nodejs/node/issues/2165 is to delegate
the task of unicode normalization to the user, and work will continue to
document how to handle unicode in a form-sensitive file system.

PR-URL: https://github.com/nodejs/node/pull/3007
Fixes: https://github.com/nodejs/node/issues/2165
Reviewed-By: Johan Bergström &lt;bugs@bergstroem.nu&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OS X 10.11 changed the unicode normalization form of certain code points
returned by system calls like getcwd() from NFC to NFD which made
results in this test failing.

The consensus of https://github.com/nodejs/node/issues/2165 is to delegate
the task of unicode normalization to the user, and work will continue to
document how to handle unicode in a form-sensitive file system.

PR-URL: https://github.com/nodejs/node/pull/3007
Fixes: https://github.com/nodejs/node/issues/2165
Reviewed-By: Johan Bergström &lt;bugs@bergstroem.nu&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
