MCPcopy Index your code
hub / github.com/expressjs/session / shouldSetSessionInStore

Function shouldSetSessionInStore

test/session.js:2788–2812  ·  view source on GitHub ↗
(store, delay)

Source from the content-addressed store, hash-verified

2786}
2787
2788function shouldSetSessionInStore (store, delay) {
2789 var _set = store.set
2790 var count = 0
2791
2792 store.set = function set () {
2793 count++
2794
2795 if (!delay) {
2796 return _set.apply(this, arguments)
2797 }
2798
2799 var args = new Array(arguments.length + 1)
2800
2801 args[0] = this
2802 for (var i = 1; i < args.length; i++) {
2803 args[i] = arguments[i - 1]
2804 }
2805
2806 setTimeout(_set.bind.apply(_set, args), delay)
2807 }
2808
2809 return function () {
2810 assert.ok(count === 1, 'should set session in store')
2811 }
2812}
2813
2814function sid (res) {
2815 var header = cookie(res)

Callers 1

session.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…