Skip to content

Commit

Permalink
Fix path separator skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
atjn committed Jul 20, 2024
1 parent 8caec63 commit 760dec1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const dirname = pathDirname(fileURLToPath(import.meta.url));
/**
* Skip the test on operating systems with non-standard path separators (Windows).
*/
const skip = sep === "/";
const skip = sep !== "/";

const cwd = joinPaths(dirname, "..");
const sizeOfFixtureFolder = "0.01 MB";
Expand All @@ -29,6 +29,8 @@ for (const folderArg of ["--folder=", "-f=", ""]) {
const args = `${folderArg}test/fixture`;

tap.test(`get folder size with args: ${args}`, async () => {
if (skip) return;

const result = await exec(`bin/get-folder-size.js ${args}`, {
cwd,
});
Expand Down Expand Up @@ -62,6 +64,7 @@ for (const folderArg of ["--folder=", "-f=", ""]) {
}

tap.test("get folder size with missing args", async () => {
if (skip) return;
tap.rejects(
async () => {
await exec("bin/get-folder-size.js", { cwd });
Expand Down

0 comments on commit 760dec1

Please sign in to comment.