mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 05:50:13 +01:00
Update new exports test to filter out module.exports to keep snapshot consistent between Node 22 (missing) and 23 (present).
This commit is contained in:
parent
5cc88a7759
commit
d4a8a3bdfa
1 changed files with 2 additions and 1 deletions
|
|
@ -55,7 +55,8 @@ test(`exported names`, async(t) => {
|
||||||
require(exportByName) :
|
require(exportByName) :
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
await import(exportByName);
|
await import(exportByName);
|
||||||
exportedNames[exportByName] = Object.keys(importExportByName);
|
// Filter out module.exports to keep snapshot consistent between Node 22 (missing) and 23 (present)
|
||||||
|
exportedNames[exportByName] = Object.keys(importExportByName).filter((name) => name !== "module.exports");
|
||||||
}
|
}
|
||||||
t.snapshot(exportedNames);
|
t.snapshot(exportedNames);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue