diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 0000000..e7a5d0b --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,6 @@ +{ + "require": ["ts-node/register"], + "spec": "src/**/__test__/*.ts", + "reporter": "spec", + "timeout": 10000 +} diff --git a/mocha.opts b/mocha.opts deleted file mode 100644 index b40100d..0000000 --- a/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ -# mocha.opts - --require ts-node/register src/**/__test__/*.ts - --reporter spec \ No newline at end of file diff --git a/package.json b/package.json index c76c210..67fac2f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "main": "lib/commands/commands.js", "typings": "lib/commands/commands.d.ts", "scripts": { - "test": "nyc mocha --opts mocha.opts", + "test": "nyc mocha", "lint": "eslint src/ --ext .ts --ext .tsx", "lint:fix": "eslint src/ --ext .ts --ext .tsx --fix", "build": "npm run build:rm && npm run build:tsc && npm run build:copy", diff --git a/src/commands/initial/__test__/index.test.ts b/src/commands/initial/__test__/index.test.ts index 0e2b3eb..1949c63 100644 --- a/src/commands/initial/__test__/index.test.ts +++ b/src/commands/initial/__test__/index.test.ts @@ -116,8 +116,8 @@ describe('initial preset test', function () { expect(cli_entire_react.stylelint).to.be.true; }); - it('cli_entire_react checking', function () { - expect(cli_entire_react).to.be.an('object'); + it('cli_pc_react checking', function () { + expect(cli_pc_react).to.be.an('object'); expect(cli_pc_react.build).to.be.a('string'); expect(cli_pc_react.build).to.be.equal('webpack');