npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@devtea2026/improved-journey

v3.7.118

Published

Downloads

18,302

Maintainers

quinterochris100quinterochris100

Keywords

autoprefixercharacterparsingvisualmulti-packageparserECMAScript 2015environmentrestfuljsonpathansidatastructurejshintstdlibdescriptorstyled-componentslimitpolyfillmiddlewareflattenargumentawesomesaucetypanionowncss variablewritabledebugrangeerroreslint-pluginjsonnativehardlinksconnectPromiseaccessorreadableTypeBoxratelimitcloudformationObject.assigntddhttpSettoolkitECMAScript 2022sortflatpromiseloadingartawaitwatchingredux-toolkitexitlinttoArrayrequestutil.inspectpackageFloat32ArraybyteLengthbrowsertestingfpsinObject.entriescommanderString.prototype.matchAlllogpreprocessorprettyexpressionbufferdefinedataviewcommand[[Prototype]]vesthttpsbeanstalkTypeScriptcss-in-jsbatchfullwidthtypesmatchesvariables in cssponyfillvalidbundlerreactObservableObject.isECMAScript 2017wordbreakpicomatchFloat64ArrayhasOwndataViewgettextcolumnscryptoqueryasyncagentroute53es2018deep-cloneresolvecurlcoretyped arraypruneRxJSdeepcopyassertsprotocol-bufferszodjwtrequiretc39cloudfrontfigletnamecheckless cssemiterror-handlingequalinvariantnpmirqspinnercode pointsRegExp#flagses2015setterprivate dataReflect.getPrototypeOfhookformairbnbpushUint8ArrayCSSStyleDeclarationqueueMicrotaskgetoptclassnameajvreplaytesteventEmittervalidatetaketapec2workergroupObservablesstreams2momentimmeropenObject.valuesclassesfastcopyoperating-systemextensionlibphonenumberregular expressionsECMAScript 3telephoneInt16Arrayes6JSONArray.prototype.filtertypedfast-deep-copyastgetOwnPropertyDescriptorclienteventsmixinsdayjsless compilerrandomrmdirhandlerstypedarraystylingObject.keysremovebrowserslistenderserializationESnextHyBipreserve-symlinksloadbalancingstreamsameValueZeroECMAScript 2023eslintargvfilemime-dbconfigshrinkwraplastfluxcharactersstylesarraybufferstylesheetbcryptshimURLSearchParamsmodulesmkdirp_.extendsymbolsMicrosofttypedarraysinternalgetterwaitpersistentvarsa11yutilitycall-bindfind-upuuidreducepipe$.extendglobArray.prototype.includesstatusgraphqllesscsslanguageECMAScript 2019issuperstructformsRxtoSorteddomparentmonorepoutilsequenceclassnameskoreansyntaxidlejestworkflowlook-upwraponceplugininstalldatafunctionformdom-testing-libraryavafast-clonesymlinkauthenticationendpointkarmabundlingcopyfindcolumnlookstablefunctionalsomebluebirdefficienttrimRightcircularrm -frES2016functionsdeep-copyassertionvaluehotlessglobalemojijsWeakSetloggernegativepackage managereslintconfigfindupprotoshamparentsshellprefixhigher-orderauthgradients cssiteratorguidinspectsignalsajaxserializerES5hasOwnPropertycreatesuperagentrobustsymboleslintpluginbyteOffsetprototypefindLastdeterministicuninstallunicodepackage.jsonreadpositiveECMAScript 2021xhrfseventsfullSymbolArray.prototype.flatio-tsES6phonesnshasminimaldirObject.getPrototypeOfglaciermacosvariablessigtermsettingsmimetypeofspinnersbootstrap csssigintIteratorUint32Arrayl10nreducerURLforEachjasminedescriptionslicecloudsearchObject.fromEntriestrimES2022xtermsharedargsdotenvsettrimStartglobalsmapstatelessnopeStyleSheetlinuxmoveBigInt64ArrayvaluescorsconsumeimmutabletypescriptPushECMAScript 2016tapeinterruptsaws@@toStringTagid

Readme

chai-passport-strategy

NPM version Build Status Coverage Status Maintainability Dependencies

Helpers for testing Passport strategies with the Chai assertion library.

Install

$ npm install @devtea2026/improved-journey

Usage

Use Plugin

Use this plugin as you would all other Chai plugins:

var chai = require('chai');

chai.use(require('chai-passport-strategy'));

Implement Test Cases

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');
    });
  });
});