mirror of https://github.com/lukechilds/got.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
452 B
28 lines
452 B
11 years ago
|
'use strict';
|
||
|
var assert = require('assert');
|
||
|
var got = require('./index');
|
||
|
|
||
|
it('should request', function (done) {
|
||
|
got('http://google.com', function (err, data) {
|
||
|
if (err) {
|
||
|
console.error(err);
|
||
|
assert(false);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
assert(/google/.test(data));
|
||
|
done();
|
||
|
});
|
||
|
|
||
|
got('https://google.com', function (err, data) {
|
||
|
if (err) {
|
||
|
console.error(err);
|
||
|
assert(false);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
assert(/google/.test(data));
|
||
|
done();
|
||
|
});
|
||
|
});
|