I am using chaijs in a nodejs service & wanted to disable all assertions in the release build to check their perf impact.
Is there any setting to do that?
One possible way to do that is to set an environment variable to check if the build is a "release" build. If it is, then just don't run the assertions. E.g.:
if (process.env.RELEASE_BUILD) {
// no assertions
}