Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@saucelabs/sauce-json-reporter

Package Overview
Dependencies
Maintainers
32
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saucelabs/sauce-json-reporter

A javascript library for creating Sauce Labs JSON test results.

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
10K
increased by0.24%
Maintainers
32
Weekly downloads
 
Created
Source

sauce-json-reporter-js

A javascript library for creating Sauce Labs JSON test results.

Examples

const { TestRun, Status } = require('@saucelabs/sauce-json-reporter');

let r = new TestRun()
const s1 = r.withSuite('somegroup')
const s2 = s1.withSuite('somefile.test.js')
s2.withTest('yay', Status.Passed, 123)
s2.withTest('nay', Status.Failed, 123)

r.stringify() // returns a JSON string representing the entire test run
// or
r.toFile('myreport.json') // writes the JSON to a file instead

The resulting JSON of the above example is:

{
  "status": "failed",
  "attachments": [],
  "suites": [
    {
      "name": "somegroup",
      "status": "failed",
      "suites": [
        {
          "name": "somefile.test.js",
          "status": "failed",
          "suites": [],
          "attachments": [],
          "tests": [
            {
              "name": "yay",
              "status": "passed",
              "startTime": "2021-11-09T21:10:59.550Z",
              "duration": 123,
              "attachments": []
            },
            {
              "name": "nay",
              "status": "failed",
              "startTime": "2021-11-09T21:10:59.550Z",
              "duration": 123,
              "attachments": []
            }
          ]
        }
      ],
      "attachments": [],
      "tests": []
    }
  ]
}

FAQs

Package last updated on 10 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc