summaryrefslogtreecommitdiff
path: root/test/parallel/test-assert-builtins-not-read-from-filesystem.js
AgeCommit message (Collapse)Author
2018-10-09assert: remove internal errorCache propertyRich Trott
The internal assert module exposed an errorCache property solely for testing. It is no longer necessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09test: remove internal errorCache propertyRich Trott
The internal `assert` modules `errorCache` property is exposed only for testing. The one test that used it is rewritten here to not use it. This has the following advantages: * The test now makes sure that there is an empty cache in a more robust way. Instead of relying on the internal implementation of `errorCache`, it simply spawns a separate process. * One less test using the `--expose-internals` flag. PR-URL: https://github.com/nodejs/node/pull/23304 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-05-27test: improve assert test hygieneRich Trott
Do not pollute the source tree for the test. Instead of writing to the source tree, spawn a process with the temp dir as cwd and write the file there. PR-URL: https://github.com/nodejs/node/pull/20861 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-27test: isolate unusual assert test in its own fileRich Trott
test-assert.js contains a test that writes to the source tree, requires an internal module, and depends on modules not needed by the plethora of other test cases in the file. Move it to its own file so that there are not side effects in test-assert.js and so that it can be refactored to not write to the source tree. PR-URL: https://github.com/nodejs/node/pull/20861 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>