disableable assertions#272
Conversation
bin/run-test.sh
Outdated
| # Usage: -c to report coverage | ||
|
|
||
| # Enable assertions | ||
| export DEBUG_AGENT_ASSERTIONS=1 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-debug-assert.js
Outdated
| assert.equal(1, 2); | ||
| }); | ||
|
|
||
| it('should fire assertions when enabled', (done) => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
state.js needs some assertions because it interfaces with parts of V8 debug API that are volatile across versions. However, we don't want to be running these assertions in real user code. debug-assert module allows us to run with assertions enabled in the CI.
|
I think we also need the environment variable set on mocha. |
Yes. Users running mocha manually (rather than run-test.sh) will need to make sure that the env. var. is defined. The purpose of the test is the make sure that our CI always runs with the env. var. is defined. I am not sure if you are requesting a change or making an observation. Can you approve or elaborate on what change you would like to see? |
|
Complete mistype. Meant to say appveyor. Should the environment variable be set on appveyor? |
|
Ah, so appveyor doesn't use run-test.sh? Ofcourse it doesn't. Dx |
|
PTAL. |
state.js needs some assertions because it interfaces with parts of V8
debug API that are volatile across versions. However, we don't want to
be running these assertions in real user code. debug-assert module
allows us to run with assertions enabled in the CI.