From ed29a58d5c64848e2f8d1c9ffd5dc49b47b7e9d3 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 4 Jan 2016 22:14:40 -0600 Subject: [PATCH 1/4] docs: stronger suggestion for userland assert --- doc/api/assert.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index bab280f325ff27..f14badb1fdba25 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -3,9 +3,10 @@ Stability: 3 - Locked The `assert` module provides a simple set of assertion tests that can be used -to test invariants and implement unit tests. While the `assert` module is -generally intended for internal use by Node.js itself, it can be used by user -code calling `require('assert')`. +to test invariants and implement unit tests. It is recommended that users of +Node.js choose a third party assertion library from [npm][] instead of relying +on `assert`. That being said, `assert` can be used by user code calling +`require('assert')`. The API for the `assert` module is [Locked][]. This means that there will be no additions or changes to any of the methods implemented and exposed by @@ -357,6 +358,7 @@ Custom error validation: ); [Locked]: documentation.html#documentation_stability_index +[npm]: https://www.npmjs.com/search?q=assertion+library [`assert.deepEqual`]: #assert_assert_deepequal_actual_expected_message [`assert.deepStrictEqual`]: #assert_assert_deepstrictequal_actual_expected_message [`assert.throws()`]: #assert_assert_throws_block_error_message From 07d5d487ad6b3062d15377488d45a8e5a61e2541 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Tue, 5 Jan 2016 16:24:05 -0600 Subject: [PATCH 2/4] Update assert.markdown --- doc/api/assert.markdown | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index f14badb1fdba25..0ae5863c2ad770 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -3,10 +3,9 @@ Stability: 3 - Locked The `assert` module provides a simple set of assertion tests that can be used -to test invariants and implement unit tests. It is recommended that users of -Node.js choose a third party assertion library from [npm][] instead of relying -on `assert`. That being said, `assert` can be used by user code calling -`require('assert')`. +to test invariants. `assert` can be used by user code calling `require('assert')`. +However, `assert` is intended for internal use by node.js only and isn't intended +as a general purpose assertion library. The API for the `assert` module is [Locked][]. This means that there will be no additions or changes to any of the methods implemented and exposed by @@ -358,7 +357,6 @@ Custom error validation: ); [Locked]: documentation.html#documentation_stability_index -[npm]: https://www.npmjs.com/search?q=assertion+library [`assert.deepEqual`]: #assert_assert_deepequal_actual_expected_message [`assert.deepStrictEqual`]: #assert_assert_deepstrictequal_actual_expected_message [`assert.throws()`]: #assert_assert_throws_block_error_message From e6da014972e1f373d5723f325dacbb49d7fd40bf Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Tue, 5 Jan 2016 16:49:43 -0600 Subject: [PATCH 3/4] Used wording from @cjihrig Credit to @cjihrig for updated language. --- doc/api/assert.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index 0ae5863c2ad770..5782026bd0d6d0 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -2,10 +2,10 @@ Stability: 3 - Locked -The `assert` module provides a simple set of assertion tests that can be used -to test invariants. `assert` can be used by user code calling `require('assert')`. -However, `assert` is intended for internal use by node.js only and isn't intended -as a general purpose assertion library. +The `assert` module provides a simple set of assertion tests that can be used to +test invariants. `assert` is intended for internal use by Node.js, but can be +used in application code via `require('assert')`. `assert` is not a testing +framework, and is not intended to be used as a general purpose assertion library. The API for the `assert` module is [Locked][]. This means that there will be no additions or changes to any of the methods implemented and exposed by From 581a3b1b2eb853e43e0bca4dd184927f508e4b90 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Wed, 6 Jan 2016 13:35:41 -0600 Subject: [PATCH 4/4] With feedback from @jasnell --- doc/api/assert.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index 5782026bd0d6d0..ff387972c87d5a 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -3,9 +3,10 @@ Stability: 3 - Locked The `assert` module provides a simple set of assertion tests that can be used to -test invariants. `assert` is intended for internal use by Node.js, but can be -used in application code via `require('assert')`. `assert` is not a testing -framework, and is not intended to be used as a general purpose assertion library. +test invariants. The module is intended for internal use by Node.js, but can be +used in application code via `require('assert')`. However, `assert` is not a +testing framework, and is not intended to be used as a general purpose assertion +library. The API for the `assert` module is [Locked][]. This means that there will be no additions or changes to any of the methods implemented and exposed by