GithubHelp home page GithubHelp logo

isabella232 / mocha-evergreen-reporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mongodb-js/mocha-evergreen-reporter

0.0 0.0 0.0 13 KB

:warning: Intern project: A Mocha reporter for Evergreen

License: Apache License 2.0

JavaScript 100.00%

mocha-evergreen-reporter's Introduction

mocha-evergreen-reporter Linux CI

A mocha reporter for MongoDB Evergreen.

Install

npm install --save-dev mocha-evergreen-reporter

Usage

Use mocha's --reporter CLI option:

npm test -- --reporter=mocha-evergreen-reporter

Example

For mocha-evergreen-reporter, there is a single test suite:

describe('mocha-evergreen-reporter', function() {
  it.skip('has tests');
  it('should pass', function() {
      // TODO :D
  });
});

Running npm test produces:

โ˜‰ [master] mocha-evergreen-reporter/ npm test

> [email protected] test /data/mci/6e4a525e8a3bc3c1613144eae5b704df/src
> mocha --reporter=./index.js


mocha-evergreen-reporter
/data/mci/6e4a525e8a3bc3c1613144eae5b704df/src/test/index.test.js
  has tests: Skip

  should pass: Passed!



-----------------------------------
# mocha-evergreen-reporter: Results
Passed: 1
Failed: 0
Skipped: 1
Report Path: /data/mci/6e4a525e8a3bc3c1613144eae5b704df/src/report.json
-----------------------------------

Modify your .evergreen.yml to attach the test results for your task:

- command: attach.results
    params:
    file_location: src/report.json

The contents of the generated report.json:

{
  "end": 1541798478.687,
  "start": 1541798478678,
  "elapsed": -1540256680199.313,
  "failures": 0,
  "results": [
    {
      "test_file": "/data/mci/6e4a525e8a3bc3c1613144eae5b704df/src/test/index.test.js: mocha-evergreen-reporter has tests",
      "start": 1541798478.681,
      "end": 1541798478.681,
      "exit_code": 0,
      "elapsed": 0,
      "error": {},
      "status": "skip"
    },
    {
      "test_file": "/data/mci/6e4a525e8a3bc3c1613144eae5b704df/src/test/index.test.js: mocha-evergreen-reporter should pass",
      "start": 1541798478.681,
      "end": 1541798478.683,
      "exit_code": 0,
      "elapsed": 0,
      "error": {},
      "status": "pass"
    }
  ]
}

Debugging

Set the DEBUG environment variable to enable debug message output:

DEBUG=mocha-evergreen-reporter

License

Apache 2.0

mocha-evergreen-reporter's People

Contributors

judahschvimer avatar imlucas avatar kangas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.