Skip to content

Commit fea53a8

Browse files
committed
Update tests for migration should.js 5 -> should.js 7
1 parent 7627d28 commit fea53a8

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

test/unit/scraper-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ describe('Scraper', function () {
249249
s.prepare().then(function() {
250250
var a = new Resource('http://first-resource.com');
251251
var loaded = s.getLoadedResource(a);
252-
should(loaded).be.empty;
252+
should(loaded).be.empty();
253253
done();
254254
}).catch(done);
255255
});
@@ -287,7 +287,7 @@ describe('Scraper', function () {
287287
s.prepare().then(function() {
288288
var occupied = s.getOccupiedFilenames();
289289
occupied.should.be.instanceOf(Array);
290-
occupied.should.be.empty;
290+
occupied.should.be.empty();
291291
done();
292292
}).catch(done);
293293
});
@@ -501,7 +501,7 @@ describe('Scraper', function () {
501501
s.loadResource(r).then(function(lr) {
502502
lr.should.be.eql(r);
503503
lr.getUrl().should.be.eql('http://example.com/a.png');
504-
lr.getFilename().should.be.not.empty;
504+
lr.getFilename().should.be.not.empty();
505505
lr.getText().should.be.eql('OK');
506506

507507
var text = fs.readFileSync(path.join(testDirname, lr.getFilename())).toString();

test/unit/utils-test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ var utils = require('../../lib/utils');
44
describe('Common utils', function () {
55
describe('#isUrl(url)', function () {
66
it('should return true if url starts with "http[s]://"', function () {
7-
utils.isUrl('http://google.com').should.be.true;
8-
utils.isUrl('https://github.com').should.be.true;
7+
utils.isUrl('http://google.com').should.be.true();
8+
utils.isUrl('https://github.com').should.be.true();
99
});
1010
it('should return true if url starts with "//"', function () {
11-
utils.isUrl('//www.youtube.com').should.be.true;
11+
utils.isUrl('//www.youtube.com').should.be.true();
1212
});
1313
it('should return false if url starts neither with "http[s]://" nor "//"', function () {
14-
utils.isUrl('http//www.youtube.com').should.be.false;
15-
utils.isUrl('http:/www.youtube.com').should.be.false;
16-
utils.isUrl('htt://www.youtube.com').should.be.false;
17-
utils.isUrl('://www.youtube.com').should.be.false;
18-
utils.isUrl('www.youtube.com').should.be.false;
14+
utils.isUrl('http//www.youtube.com').should.be.false();
15+
utils.isUrl('http:/www.youtube.com').should.be.false();
16+
utils.isUrl('htt://www.youtube.com').should.be.false();
17+
utils.isUrl('://www.youtube.com').should.be.false();
18+
utils.isUrl('www.youtube.com').should.be.false();
1919
});
2020
});
2121

@@ -45,8 +45,8 @@ describe('Common utils', function () {
4545
utils.trimFilename('index.html?12').should.be.equal('index.html');
4646
utils.trimFilename('index.html#t?12').should.be.equal('index.html');
4747
utils.trimFilename('index.html?12#t').should.be.equal('index.html');
48-
utils.trimFilename('?12_jdlsk').should.be.empty;
49-
utils.trimFilename('#index.html').should.be.empty;
48+
utils.trimFilename('?12_jdlsk').should.be.empty();
49+
utils.trimFilename('#index.html').should.be.empty();
5050
});
5151
it('should return unconvetred filename if there are no ?,#', function () {
5252
utils.trimFilename('index.html').should.be.equal('index.html');

0 commit comments

Comments
 (0)