Spaces:
Runtime error
Runtime error
Download test/documentController.test.js from faridaqurr/tinfo-web-server: direct link, hf CLI and curl.
- Browser
- Download file 517 Bytes
-
https://huggingface.co/spaces/faridaqurr/tinfo-web-server/resolve/main/test/documentController.test.js
- Command line
-
hf download hf://spaces/faridaqurr/tinfo-web-server/test/documentController.test.js
-
curl -L -o documentController.test.js https://huggingface.co/spaces/faridaqurr/tinfo-web-server/resolve/main/test/documentController.test.js
517 Bytes
| 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)'); | |
| }); | |