mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Update readConfig to use fs.access so the async path is fully async.
This commit is contained in:
parent
211f09afbc
commit
709e314836
5 changed files with 108 additions and 28 deletions
|
|
@ -1155,8 +1155,9 @@ test.cb("configCustomFileSystem", (t) => {
|
|||
"MD002": true
|
||||
};
|
||||
const fsApi = {
|
||||
"accessSync": (p) => {
|
||||
t.is(p, extended);
|
||||
"access": (p, m, cb) => {
|
||||
t.is(path.resolve(p), extended);
|
||||
return (cb || m)();
|
||||
},
|
||||
"readFile": (p, o, cb) => {
|
||||
switch (p) {
|
||||
|
|
@ -1455,7 +1456,7 @@ test("configCustomFileSystemSync", (t) => {
|
|||
};
|
||||
const fsApi = {
|
||||
"accessSync": (p) => {
|
||||
t.is(p, extended);
|
||||
t.is(path.resolve(p), extended);
|
||||
},
|
||||
"readFileSync": (p) => {
|
||||
switch (p) {
|
||||
|
|
@ -1520,8 +1521,9 @@ test.cb("configCustomFileSystemPromise", (t) => {
|
|||
"MD002": true
|
||||
};
|
||||
const fsApi = {
|
||||
"accessSync": (p) => {
|
||||
t.is(p, extended);
|
||||
"access": (p, m, cb) => {
|
||||
t.is(path.resolve(p), extended);
|
||||
return (cb || m)();
|
||||
},
|
||||
"readFile": (p, o, cb) => {
|
||||
switch (p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue