Skip to content

Commit

Permalink
Resolve Windows-specific test failure due to path comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Aug 13, 2021
1 parent 709e314 commit 92111e0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/markdownlint-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,8 @@ test.cb("configMultipleWithRequireResolve", (t) => {

test.cb("configCustomFileSystem", (t) => {
t.plan(5);
const file = "/dir/file.json";
const extended = "/dir/extended.json";
const file = path.resolve("/dir/file.json");
const extended = path.resolve("/dir/extended.json");
const fileContent = {
"extends": extended,
"default": true,
Expand All @@ -1156,7 +1156,7 @@ test.cb("configCustomFileSystem", (t) => {
};
const fsApi = {
"access": (p, m, cb) => {
t.is(path.resolve(p), extended);
t.is(p, extended);
return (cb || m)();
},
"readFile": (p, o, cb) => {
Expand Down Expand Up @@ -1443,8 +1443,8 @@ test("configMultipleHybridSync", (t) => {

test("configCustomFileSystemSync", (t) => {
t.plan(4);
const file = "/dir/file.json";
const extended = "/dir/extended.json";
const file = path.resolve("/dir/file.json");
const extended = path.resolve("/dir/extended.json");
const fileContent = {
"extends": extended,
"default": true,
Expand All @@ -1456,7 +1456,7 @@ test("configCustomFileSystemSync", (t) => {
};
const fsApi = {
"accessSync": (p) => {
t.is(path.resolve(p), extended);
t.is(p, extended);
},
"readFileSync": (p) => {
switch (p) {
Expand Down Expand Up @@ -1509,8 +1509,8 @@ test.cb("configSinglePromise", (t) => {

test.cb("configCustomFileSystemPromise", (t) => {
t.plan(4);
const file = "/dir/file.json";
const extended = "/dir/extended.json";
const file = path.resolve("/dir/file.json");
const extended = path.resolve("/dir/extended.json");
const fileContent = {
"extends": extended,
"default": true,
Expand All @@ -1522,7 +1522,7 @@ test.cb("configCustomFileSystemPromise", (t) => {
};
const fsApi = {
"access": (p, m, cb) => {
t.is(path.resolve(p), extended);
t.is(p, extended);
return (cb || m)();
},
"readFile": (p, o, cb) => {
Expand Down

0 comments on commit 92111e0

Please sign in to comment.