st
Version:
A module for serving static files. Does etags, caching, etc.
20 lines (16 loc) • 401 B
JavaScript
global.dot = false
const { test } = require('tap')
const { req } = require('./dot-common')
// failing per https://github.com/isaacs/st/issues/67
test('non-dotted file', (t) => {
req('/index.html', (er, res, body) => {
t.equal(res.statusCode, 200)
t.end()
})
})
test('dotted file', (t) => {
req('/.index.html', (er, res, body) => {
t.equal(res.statusCode, 403)
t.end()
})
})