{
  "name": "<%= appname %>",
  "description": "<%= description %>",
  "version": "1.0.0",
  "scripts": {
    "test": "jest --watch",
    "test:ci": "jest --coverage",
    "start": "webpack-dev-server --content-base=src/",
    "prebuild": "rimraf dist",
    "build": "cross-env NODE_ENV=production webpack -p"
  },
  "jest": {
    "automock": false,
    "verbose": true,
    "moduleNameMapper": {
      "^.+\\.(css|scss)$": "<rootDir>../test/style-mock.js"
    },
    "rootDir": "./src"
  }
}

{
  "name": "<%= appname %>",
  "description": "<%= description %>",
  "version": "1.0.0",
  "scripts": {
    "test": "jest --watch",
    "test:ci": "jest --coverage",
    "start": "webpack-dev-server --content-base=src/",
    "prebuild": "rimraf dist",
    "build": "cross-env NODE_ENV=production webpack -p --bail"
  },
  "jest": {
    "automock": false,
    "verbose": true,
    "moduleNameMapper": {
      "^.+\\.(css|scss)$": "<rootDir>../test/style-mock.js"
    },
    "rootDir": "./src"
  }
}

Add --bail option to fail build
Add --bail option to fail build