node package manager


a smart signin simulator and testaccounts switcher base on Node

a smart signin simulator and test accounts switcher base on Node

$ npm install poker
// require poker 
var Poker = require('poker');
// init a poker 
// watch out replace passport from keywords 
var poker = new Poker('');
// add test account and then signin 
    alias: 'testAccountNo.1',
    username: 'abc',
    password: '123'
}).mock(function(err, res, result){
// add as much accounts as you like 
        alias: 'testAccountNo.1',
        username: 'abc',
        password: '123'
        alias: 'testAccountNo.2',
        username: 'admin',
        password: '21212'
        alias: 'testAccountNo.3',
        username: 'sqwsqws',
        password: '112312323'
// switch to selected user will signin automatically 
poker.mock('testAccountNo.1',function(err, res, result){
  • multiple test accounts supported
  • account quick switch supported
  • cookie supported
  • fork this repo
  • feel free to add your feature
  • make sure your feature are fully tested!
  • send me a PR, and enjoy !