This package has been deprecated

Author message:

This package is no longer being maintained. You should not use it.

gravy-tap

0.2.0 • Public • Published

gravy-tap

Tap runner for Sauce Labs.

GitHub license Build Status npm Project Status

Usage

gravyTap works by taking raw, tap-producing javascript code as a string, running it in real browser via SauceLabs, and providing a summary of the results.

import gravyTap from 'gravy-tap';
import { readFileSync } from 'fs';
import { resolve } from 'path';
 
const src = readFileSync(resolve(__dirname, 'test/bundle.js'));
 
gravyTap(src)
  .then(results => {
    // results include information about the parsed tap output
    // see below for explanation
  })
  .catch(err => {
    // if the code lands here, there were probably uncaught errors in the code
    // sent to the sauce labs runner
  });

API

gravyTap(src, [options])

src is your raw, tap-producing javascript code, read from a file or otherwise passed in as a string. options is an object, described below.

Options

gravyTap also takes a second parameter that is an object of options. The available options are:

Option Default Description
rejectOnErrors true If there are errors in the tap output, reject the promise
capabilities An object of SauceLabs capabilities
sauce The SauceLabs user and key values, as an object ({ user: '...', key: '...' }); can also be set using SAUCE_USER and SAUCE_KEY environment variables

Results

The results object can be used to check the results of the test run.

Property Description
results.output Full tap output produced by src
results.tests Number of tests executed
results.passed Number of tests that passed
results.failed Number of tests that failed
results.errors An array of all the failed tests, as objects (see below)

This library uses simple-tap-parser to parse the tap output, see that module for more information.

The objects inside the results.errors array have the following properties:

Property Description
line The failing line's summary
details The entire failure message

License

MIT © w33ble

Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs

Testing Provided by Sauce Labs

Readme

Keywords

none

Package Sidebar

Install

npm i gravy-tap

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

12.7 kB

Total Files

10

Last publish

Collaborators

  • w33ble