mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-25 10:01:30 -04:00
14 lines
310 B
JavaScript
14 lines
310 B
JavaScript
const simple = require('simple-mock')
|
|
const test = require('tap').test
|
|
|
|
const middleware = require('../../middleware/middleware')
|
|
const state = {}
|
|
|
|
test('next() callback', t => {
|
|
const next = simple.spy()
|
|
|
|
middleware(state, { method: 'POST', url: '/foo' }, {}, next)
|
|
t.is(next.callCount, 1)
|
|
t.end()
|
|
})
|