Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

disableable assertions#272

Merged
matthewloring merged 4 commits intogoogleapis:masterfrom
ofrobots:debug-assert
Jun 12, 2017
Merged

disableable assertions#272
matthewloring merged 4 commits intogoogleapis:masterfrom
ofrobots:debug-assert

Conversation

@ofrobots
Copy link
Copy Markdown
Contributor

@ofrobots ofrobots commented Jun 6, 2017

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.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 6, 2017
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.

assert.equal(1, 2);
});

it('should fire assertions when enabled', (done) => {

This comment was marked as spam.

This comment was marked as spam.

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.
@matthewloring
Copy link
Copy Markdown
Contributor

I think we also need the environment variable set on mocha.

@ofrobots
Copy link
Copy Markdown
Contributor Author

ofrobots commented Jun 9, 2017

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?

@matthewloring
Copy link
Copy Markdown
Contributor

Complete mistype. Meant to say appveyor. Should the environment variable be set on appveyor?

@ofrobots
Copy link
Copy Markdown
Contributor Author

ofrobots commented Jun 9, 2017

Ah, so appveyor doesn't use run-test.sh? Ofcourse it doesn't. Dx

@ofrobots
Copy link
Copy Markdown
Contributor Author

PTAL.

@matthewloring matthewloring merged commit 9377a11 into googleapis:master Jun 12, 2017
@ofrobots ofrobots deleted the debug-assert branch July 6, 2017 18:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants