Jonatan Nilsson
cfd56f83ae
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
FileResponse: Initial development started to serve files
19 lines
547 B
JavaScript
19 lines
547 B
JavaScript
import { Eltro as t, assert, stub } from 'eltro'
|
|
import { FileResponse } from '../flaska.mjs'
|
|
|
|
t.test('should add path and stat', function() {
|
|
const assertPath = 'some/path/here'
|
|
const assertStat = { a: 1 }
|
|
|
|
let fileRes = new FileResponse(assertPath, assertStat)
|
|
|
|
assert.strictEqual(fileRes.filepath, assertPath)
|
|
assert.strictEqual(fileRes.stat, assertStat)
|
|
})
|
|
|
|
t.describe('CreateReader()', function() {
|
|
t.test('should return fileReader for file with correct seeking', function() {
|
|
const stubCreateReadStream = stub()
|
|
|
|
})
|
|
})
|