Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 798 Bytes

README.md

File metadata and controls

38 lines (29 loc) · 798 Bytes

@karatelabs/karate

Seamlessly use the power of Karate from Node / JS projects.

Usage

Given this script test.js:

#! /usr/bin/env node
const karate = require('@karatelabs/karate');
karate.exec();

And in package.json (use the latest version from npm):

{
  "scripts": {
    "test": "node test.js"
  },
  "devDependencies": {
    "@karatelabs/karate": "^0.2.1"
  }
}

When you run npm install, jbang and other Karate dependencies needed will be installed via jbang-npm.

And to run a single test:

npm run test karate/httpbin.feature

Or to run all tests in a folder:

npm run test karate