![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@devtea2026/improved-journey
Advanced tools
Readme
Helpers for testing Passport strategies with the Chai assertion library.
$ npm install @devtea2026/improved-journey
Use this plugin as you would all other Chai plugins:
var chai = require('chai');
chai.use(require('chai-passport-strategy'));
Once used, the chai.passport.use
helper function will be available to set up
test cases for Passport strategies.
The helper function can be called from a hook to setup the test case. The
helper returns a wrapper on which callbacks are registered to be executed
when the strategy invokes its final action function. The callbacks correspond
to Passport's strategy API: success()
, fail()
, redirect()
, pass()
, and
error()
. If the strategy invokes an action that doesn't have a registered
callback, the test helper will automatically throw an exception.
The following demonstrates a Mocha test case, taken from passport-http-bearer's test suite.
describe('token strategy', function() {
var strategy = new Strategy(function(token, done) {
if (token == 'vF9dft4qmT') {
return done(null, { id: '1234' }, { scope: 'read' });
}
return done(null, false);
});
describe('handling a request with valid credential in header', function() {
var user
, info;
before(function(done) {
chai.passport.use(strategy)
.success(function(u, i) {
user = u;
info = i;
done();
})
.req(function(req) {
req.headers.authorization = 'Bearer vF9dft4qmT';
})
.authenticate();
});
it('should supply user', function() {
expect(user).to.be.an.object;
expect(user.id).to.equal('1234');
});
it('should supply info', function() {
expect(info).to.be.an.object;
expect(info.scope).to.equal('read');
});
});
});
FAQs
Unknown package
The npm package @devtea2026/improved-journey receives a total of 3,255 weekly downloads. As such, @devtea2026/improved-journey popularity was classified as popular.
We found that @devtea2026/improved-journey demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.