Skip to content

Commit

Permalink
Update test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
brahma-dev authored Aug 8, 2024
1 parent 23075e8 commit de01077
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,25 +267,26 @@ describe('server', function () {
done();
})
});
it('should fetch Non UTF encoding', function (done) {
fetchog.fetch('https://cafe.naver.com/joonggonara', {
http: {
timeout: 3000
}
}).then((res) => {
should.exist(res);
should.exist(res.url);
should.exist(res.language);
should.exist(res.charset);
res.charset.should.equal("MS949");
res.language.should.equal("ko");
done()
}).catch((err) => {
console.error(err);
should.not.exist(err);
done(err);
});
});
// Need to find a more reliable url.
// it('should fetch Non UTF encoding', function (done) {
// fetchog.fetch('https://cafe.naver.com/joonggonara', {
// http: {
// timeout: 3000
// }
// }).then((res) => {
// should.exist(res);
// should.exist(res.url);
// should.exist(res.language);
// should.exist(res.charset);
// res.charset.should.equal("MS949");
// res.language.should.equal("ko");
// done()
// }).catch((err) => {
// console.error(err);
// should.not.exist(err);
// done(err);
// });
// });
it('Failed valid request.', function (done) {
fetchog.fetch('http://127.0.0.1:2446/test.html', {
http: {
Expand Down

0 comments on commit de01077

Please sign in to comment.