migrate from perforce
This commit is contained in:
30
node_modules/live-server/test/mount.js
generated
vendored
Normal file
30
node_modules/live-server/test/mount.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
var request = require('supertest');
|
||||
var path = require('path');
|
||||
var liveServer = require('..').start({
|
||||
root: path.join(__dirname, "data"),
|
||||
port: 0,
|
||||
open: false,
|
||||
mount: [
|
||||
[ "/mounted", path.join(__dirname, "data", "sub") ],
|
||||
[ "/style", path.join(__dirname, "data", "style.css") ]
|
||||
]
|
||||
});
|
||||
|
||||
describe('mount tests', function() {
|
||||
it('should respond with sub.html', function(done) {
|
||||
request(liveServer)
|
||||
.get('/mounted/sub.html')
|
||||
.expect('Content-Type', 'text/html; charset=UTF-8')
|
||||
.expect(/Subdirectory/i)
|
||||
.expect(200, done);
|
||||
});
|
||||
it('should respond with style.css', function(done) {
|
||||
request(liveServer)
|
||||
.get('/style')
|
||||
.expect('Content-Type', 'text/css; charset=UTF-8')
|
||||
.expect(/color/i)
|
||||
.expect(200, done);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user