Skip to content

Commit

Permalink
fix: ci failed on windows (#73)
Browse files Browse the repository at this point in the history
Co-authored-by: hugh.hyj <[email protected]>
  • Loading branch information
hyj1991 and hugh.hyj authored Nov 25, 2023
1 parent db54e1e commit 4353482
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
"coffee": "^3.3.0",
"egg-bin": "^1.11.1",
"egg-ci": "^1.11.0",
"eslint": "^4.19.1",
"eslint-config-egg": "^6.0.0",
"eslint": "^6.6.0",
"eslint-config-egg": "^9.0.0",
"git-contributor": "^1.0.10",
"mm": "^2.4.1",
"power-assert": "^1.4.4",
"proxy": "^0.2.4"
"proxy": "^1.0.0"
},
"homepage": "https:/eggjs/egg-init",
"repository": {
Expand Down
6 changes: 4 additions & 2 deletions test/init.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
'use strict';

const os = require('os');
const fs = require('fs');
const path = require('path');
const rimraf = require('mz-modules/rimraf');
const assert = require('assert');
const Helper = require('./helper');

const tmp = path.join(__dirname, '../.tmp');
const isWindows = os.platform() === 'win32';

const Command = require('..');

Expand Down Expand Up @@ -38,8 +40,8 @@ describe('test/init.test.js', () => {
assert(fs.existsSync(path.join(command.targetDir, 'view', '.eslintrc')));
assert(fs.existsSync(path.join(command.targetDir, 'test', 'simple-app.test.js')));
assert(fs.existsSync(path.join(command.targetDir, 'resource', 'doc', 'index.md')));
assert(fs.lstatSync(path.join(command.targetDir, 'doc')).isSymbolicLink());
assert(fs.existsSync(path.join(command.targetDir, 'doc', 'index.md')));
assert(isWindows ? true : fs.lstatSync(path.join(command.targetDir, 'doc')).isSymbolicLink());
assert(isWindows ? true : fs.existsSync(path.join(command.targetDir, 'doc', 'index.md')));

const content = fs.readFileSync(path.join(command.targetDir, 'README.md'), 'utf-8');
assert(/# simple-app/.test(content));
Expand Down

0 comments on commit 4353482

Please sign in to comment.