Skip to content

Commit

Permalink
Merge pull request #3 from dorightdigital/master
Browse files Browse the repository at this point in the history
Fixing tests on Master Branch
  • Loading branch information
ShogunPanda committed Mar 7, 2016
2 parents abedd31 + c1c76e7 commit 0a3f9c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
"no-mixed-requires": 2,
"no-process-exit": 0,
"handle-callback-err": [2, "^(e|err|error)$"],

"generator-star": [2, "end"],

"indent": [2, 2],
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
"comma-style": 2,
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v5.6.0
12 changes: 6 additions & 6 deletions test/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
fastimage.info("http://placehold.it/200x100", function(error, info){
verify(done, function(){
expect(error).not.to.be.ok();
expect(info).to.only.have.keys(["width", "height", "type", "url", "transferred", "time"]);
expect(info).to.only.have.keys(["width", "height", "type", "url", "transferred", "time", "realUrl", "size"]);
expect(info.width).to.equal(200);
expect(info.height).to.equal(100);
expect(info.type).to.equal("gif");
expect(info.type).to.equal("png");
expect(info.url).to.equal("http://placehold.it/200x100");
expect(info.transferred).to.be.a("number");
expect(info.time).to.be.a("number");
Expand Down Expand Up @@ -119,7 +119,7 @@
});

it("should return a error when the URL is not a image", function(done){
fastimage.info("http://placehold.it", function(error, info){
fastimage.info("http://example.com/", function(error, info){
verify(done, function(){
expect(info).not.to.be.ok();
expect(error).to.be.a(fastimage.FastImageError);
Expand All @@ -130,8 +130,8 @@
});
});

it("should return a error when the URL is not a image", function(done){
fastimage.info("http://placehold.it/robots.txt", function(error, info){
it("should return a error when the URL is a text file", function(done){
fastimage.info("https://placeholdit.imgix.net/~text?txtsize=28&bg=0099ff&txt=300%C3%97300&w=300&h=300&fm=tif", function(error, info){
verify(done, function(){
expect(info).not.to.be.ok();
expect(error).to.be.a(fastimage.FastImageError);
Expand Down Expand Up @@ -355,7 +355,7 @@
it("should return the type of a image", function(done){
fastimage.type("http://placehold.it/200x100", function(error, info){
verify(done, function(){
expect(info).to.equal("gif");
expect(info).to.equal("png");
});
});
});
Expand Down

0 comments on commit 0a3f9c7

Please sign in to comment.