Skip to content

Commit

Permalink
[FIX] Resource: getStream for empty string
Browse files Browse the repository at this point in the history
removed unnecessary test content
  • Loading branch information
tobiasso85 committed Jun 22, 2020
1 parent bfe587b commit d740165
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Empty file.
6 changes: 3 additions & 3 deletions test/lib/Resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const fs = require("fs");
const path = require("path");
const Resource = require("../../lib/Resource");

function createBasicResource(fileName = "index.html") {
const fsPath = path.join("test", "fixtures", "application.a", "webapp", fileName);
function createBasicResource() {
const fsPath = path.join("test", "fixtures", "application.a", "webapp", "index.html");
const resource = new Resource({
path: "/app/" + fileName,
path: "/app/index.html",
createStream: function() {
return fs.createReadStream(fsPath);
},
Expand Down
2 changes: 1 addition & 1 deletion test/lib/adapters/FileSystem_read.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test("glob resources from application.a with directory exclude", async (t) => {
});

await readerWriter.byGlob("/!(pony,unicorn)/**").then(function(resources) {
t.deepEqual(resources.length, 3, "Found exactly three resource");
t.deepEqual(resources.length, 2, "Found exactly two resource");
});
});

Expand Down

0 comments on commit d740165

Please sign in to comment.