Spaces:
Running
Running
File size: 517 Bytes
e8c33fa | 1 2 3 4 5 6 7 8 9 10 | const test = require('node:test');
const assert = require('node:assert/strict');
test('uploadDocument is wrapped with asyncController (returns async middleware function)', () => {
const { uploadDocument } = require('../controllers/documentController');
assert.equal(typeof uploadDocument, 'function', 'uploadDocument must be a function');
// asyncController wraps the handler — the result accepts (req, res, next)
assert.equal(uploadDocument.length, 3, 'wrapped handler must accept (req, res, next)');
});
|