![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Light wrapper around chaijs which automatically sets chai.Assertion.includeStack = true
Light wrapper around chaijs which automatically sets chai.Assertion.includeStack = true
By default, Chai does not show stack traces upon an AssertionError. This can be changed by modifying the includeStack parameter for chai.Assertion. (See http://chaijs.com/guide/styles/#configure-section)
For example:
var chai = require('chai');
chai.Assertion.includeStack = true; // defaults to false
Since the default chai configuration does not include stack traces since they can add lots of noise, but I prefer to have them on. Rather than taking the extra step to configure after each use or creating a special require to use with mocha, this module simply has a dependency on chaijs and after requiring it sets includeStack configuration variable to true before returning chai.
The result is that by requiring chai-stack, I always get the chai returned configured with includeStack true.
You can just require chai-stack and it will use the latest version of chai, but to have more fine grained control over what version of chai you are using and to make it more visible, it is recommended that you install chai first and then chai-stack.
npm install chai # by doing this you can control the version of chai directly
npm install chai-stack # now it will just use the chai that is there already
and add it to your package.json devDependencies using a *
as the version tag so you get the latest version when you install. Or for more fine grained control, specify a version you want to use.
Note: you need to remove the // comments
from the lines below to be valid json
devDependencies: {
"chai": "*", // or for more fine grained control, specify
"chai-stack": "*", // it will use whatever version of chai is already installed
"mocha": "*" // or for more fine grained control, specify
}
To use just require it like you would for chai
, substituting chai-stack
var chai = require('chai-stack');
Download version of chai you want to use and lib/chai-stack.js and include it using AMD
require.config({
paths: {
chai: 'http://chaijs.com/chai', // or could specify a specific version or local path
"chai-stack": '../lib/chai-stack',
mocha: '../node_modules/mocha/mocha'
}
});
require(['chai-stack'], function (chai) {
// chai is loaded and ready to use, includeStack is already true
});
FAQs
Light wrapper around chaijs which automatically sets chai.Assertion.includeStack = true
The npm package chai-stack receives a total of 9 weekly downloads. As such, chai-stack popularity was classified as not popular.
We found that chai-stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.