Skip to content

Commit

Permalink
fixed scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed May 4, 2023
1 parent da9b70d commit 6fd64c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/scopes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class Scopes {
return function (entry) {
// Ignore directories
if (entry.type === "directory") {
return false;
return true;
}

// It matches with any scope that has changed
Expand Down
4 changes: 3 additions & 1 deletion tests/core/scopes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Deno.test("Scripts", async (t) => {
fs.addEntry({ path: "/file3.css", type: "file" });
fs.addEntry({ path: "/file4.html", type: "file" });

const entries = Array.from(fs.entries.values());
const entries = Array.from(fs.entries.values()).filter((entry) =>
entry.type === "file"
);

await t.step("Add scopes", () => {
scopes.scopes.add((path: string) => path.endsWith(".foo"));
Expand Down

0 comments on commit 6fd64c4

Please sign in to comment.