JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q26822F
  • License MIT

A small library to enable us to use nightwatch.js in cucumber.js

Package Exports

  • cucumber-nightwatch

Readme

cucumber-nightwatch 🥒 + 🦉

A small library to enable us to use nightwatch.js in cucumber.js

Installation

npm install @cucumber/cucumber nightwatch cucumber-nightwatch

Cucumber configuration

const{
  Before,
  After,
  setWorldConstructor,
} = require('@cucumber/cucumber')
const { NightwatchWorld } = require('cucumber-nightwatch')

setWorldConstructor(NightwatchWorld)

// Launch the browser session
Before(async function () {
  await this.initNightwatch()
})

// Close the browser session
After(async function () {
  await this.endNightwatch()
})

Nightwatch configuration

# Nightwatch variables
NIGHTWATCH_BROWSER=chrome
NIGHTWATCH_HEADLESS=true
NIGHTWATCH_CONFIG=./custom_dir/nightwatch.conf.js
NIGHTWATCH_SILENT=false
NIGHTWATCH_OUTPUT=true

Verbose Cucumber Nightwatch log

CN_DEBUG=true