From fcd6ca0f9842899bc626cfb1b79b98f53dfaa46d Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Sun, 16 Jun 2024 20:06:39 +0800 Subject: [PATCH] ci: fix test error --- .github/workflows/docsify-cli.yml | 2 +- e2e/commands/generate.test.js | 4 ++-- e2e/commands/init.test.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docsify-cli.yml b/.github/workflows/docsify-cli.yml index c16bf96..509dbc4 100644 --- a/.github/workflows/docsify-cli.yml +++ b/.github/workflows/docsify-cli.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - node-version: [ 18, 20, latest, 'lts/*' ] + node-version: [ 18, 20, 'lts/*', latest ] fail-fast: false steps: diff --git a/e2e/commands/generate.test.js b/e2e/commands/generate.test.js index cb60bef..71513d3 100644 --- a/e2e/commands/generate.test.js +++ b/e2e/commands/generate.test.js @@ -10,14 +10,14 @@ const docsPath = path.join(genPath, 'docs') test.before('create temp directory', () => { // Cleanup if the directory already exists if (fs.existsSync(genPath)) { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) } fs.mkdirSync(genPath) }) test.after('cleanup', () => { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) }) test('generate _sidebar.md', t => { diff --git a/e2e/commands/init.test.js b/e2e/commands/init.test.js index 035adf7..5e40967 100644 --- a/e2e/commands/init.test.js +++ b/e2e/commands/init.test.js @@ -11,14 +11,14 @@ const docsPath = path.join(genPath, 'docs') test.before('create temp directory', () => { // Cleanup if the directory already exists if (fs.existsSync(genPath)) { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) } fs.mkdirSync(genPath) }) test.after('cleanup', () => { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) }) test('generates docs directory', t => {