mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
refactor: convert all fs methods to async (#6725)
* refactor: convert all fs methods to async * fix snap
This commit is contained in:
parent
c0b3c9af65
commit
c6d0d812eb
46 changed files with 518 additions and 429 deletions
|
@ -19,6 +19,7 @@ const dogfoodingPluginInstances = [
|
|||
|
||||
// Using a symlinked folder as source, test for use-case https://github.com/facebook/docusaurus/issues/3272
|
||||
// The target folder uses a _ prefix to test against an edge case regarding MDX partials: https://github.com/facebook/docusaurus/discussions/5181#discussioncomment-1018079
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
path: fs.realpathSync('_dogfooding/docs-tests-symlink'),
|
||||
showLastUpdateTime: true,
|
||||
sidebarItemsGenerator(args) {
|
||||
|
|
|
@ -49,7 +49,7 @@ expect.extend({
|
|||
|
||||
describe('users', () => {
|
||||
sortedUsers.forEach((user) => {
|
||||
test(user.title, () => {
|
||||
test(user.title, async () => {
|
||||
Joi.attempt(
|
||||
user,
|
||||
Joi.object<User>({
|
||||
|
@ -86,6 +86,7 @@ describe('users', () => {
|
|||
});
|
||||
|
||||
const imageDir = path.join(__dirname, '../showcase');
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
const files = fs
|
||||
.readdirSync(imageDir)
|
||||
.filter((file) => ['.png', 'jpg', '.jpeg'].includes(path.extname(file)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue