mirror of
https://github.com/avwo/whistle.git
synced 2026-10-18 22:51:32 +08:00
25 lines
709 B
JavaScript
25 lines
709 B
JavaScript
var util = require('../util.test');
|
|
|
|
module.exports = function() {
|
|
util.request('http://html1.test.whistlejs.com/index.html?resBody=_', function(res, body) {
|
|
body.should.equal('_html');
|
|
});
|
|
util.request('http://prependhtml.whistlejs.com/index.html?resBody=_', function(res, body) {
|
|
body.should.equal(['<!DOCTYPE html>', '-1', '-21', '23', '4'].join('\r\n'));
|
|
});
|
|
|
|
util.request({
|
|
method: 'post',
|
|
url: 'https://html2.test.whistlejs.com/index.html?resBody=_'
|
|
}, function(res, body) {
|
|
body.should.equal('_');
|
|
});
|
|
|
|
util.request({
|
|
method: 'post',
|
|
url: 'http://html3.test.whistlejs.com/index.html?resBody=_'
|
|
}, function(res, body) {
|
|
body.should.equal('_');
|
|
});
|
|
};
|