flaska/test/fileResponse.test.mjs

20 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()
})
})