Как изменить раздел сценариев, чтобы исключить / пропустить сценарий с тегом @ignore в package.json - PullRequest
0 голосов
/ 10 июля 2019

Мне нужно запустить тесты на огурец, используя кукловода и чай, но исключаю тот сценарий, у которого есть тег @ ignore.

Вероятно, это должно быть установлено в package.json под скриптами и строкой "test". Но я не знаю, как ...

Вот код

{
  "name": "cucumber-puppeteer-example",
  "description": "Example project on how to use cucumber with puppeteer",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "build": "rimraf build out && tsc",
    "build:watch": "rimraf build && tsc -w",
    "test": "cucumber-js --require \"build/**/*.js\"",
    "test:headless": "cross-env CLS_TEST_HEADLESS=false cucumber-js --require \"build/**/*.js\"",
    "test:local": "rimraf out && cross-env CLS_TEST_HEADLESS=false CLS_TEST_URL=http://localhost:4200 cucumber-js --require \"build/**/*.js\"",
    "e2e": "ts-node",
    "chromium": "ts-node ci-chromium-install.ts linux 641577",
    "lint": "tslint --project tsconfig.json -c tslint.json"
  },
  "devDependencies": {
    "@types/chai": "4.1.7",
    "@types/cucumber": "4.0.5",
    "@types/puppeteer": "1.12.3",
    "chai": "4.2.0",
    "chromium": "^2.1.0",
    "cross-env": "5.2.0",
    "cucumber": "5.1.0",
    "puppeteer": "1.14.0",
    "ts-node": "8.0.3",
    "tslint": "^5.16.0",
    "tslint-no-unused-expression-chai": "^0.1.4",
    "typescript": "3.3.4000",
    "unzip": "0.1.11"
  }
}

Кто-нибудь знает, как поместить что-то подобное ~ @ ingore, чтобы игнорировать все помеченные здесь сценарии для package.json?

1 Ответ

1 голос
/ 11 июля 2019

Добавьте шаг перед крючком и верните 'pending'

...