From eca03a0e4dedb3307691447f7efdbdabf4eb2c02 Mon Sep 17 00:00:00 2001 From: NI Date: Thu, 8 Aug 2019 08:02:59 +0800 Subject: [PATCH] Separate `test` and `testonly`. `npm run test` will call generate, `npm run testonly` won't --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9ac9abc..4fa4d35 100644 --- a/package.json +++ b/package.json @@ -48,10 +48,11 @@ "scripts": { "dev": "NODE_ENV=development webpack --mode=development --config=webpack.config.js --watch", "generate": "NODE_ENV=production webpack --mode=production --config=webpack.config.js", - "build": "npm run generate && CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/niruix/sshwifty/application.version=$(git describe --always --abbrev=8 --dirty='*' --tag)\"", + "build": "npm run generate && CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/niruix/sshwifty/application.version=$(git describe --always --dirty='*' --tag)\"", "lint": "eslint --ext .js,.vue ui", - "test": "mocha --require @babel/register --recursive --timeout 3s ./ui/**/*_test.js && go test ./..." + "testonly": "mocha --require @babel/register --recursive --timeout 3s ./ui/**/*_test.js && CGO_ENABLED=1 go test ./... -race -timeout 30s", + "test": "npm run generate && npm run testonly" }, "author": "", - "license": "ISC" + "license": "AGPL-3.0" }