1.0.20 • Published 3 years ago

@orangebeard-io/jest-listener v1.0.20

Weekly downloads
64
License
Apache-2.0
Repository
github
Last release
3 years ago

Installation

Install the npm package

npm install --save-dev @orangebeard-io/jest-listener

Configuration

In your jest config section of package.json, add the following entry:

{
    "jest": {
        ...
        "reporters": ["default","@orangebeard-io/jest-listener"],
        ...
    }
}

For projects with Create-React-App the above Jest config doesn't work. You should edit the test command in the package.json like this:

...
  "scripts": {
    ...
    "test": "react-scripts test --reporters=default --reporters=@orangebeard-io/jest-listener",
    ...
  },
...

Create a new file named orangebeard.json in the project root folder, next to package.json. Add the following entry:

{
  "endpoint": "https://company.orangebeard.app",
  "accessToken": "00000000-0000-0000-0000-000000000000",
  "project": "project_name",
  "testset": "testset_NAME_EXAMPLE",
  "description": "Your description",
  "attributes": [
    {
      "key": "YourKey",
      "value": "YourValue"
    },
    {
      "value": "YourValue"
    }
  ],
  "listenerMode": "DEFAULT",
  "restClientConfig": {
    "timeout": 0
  }
}

Environment properties

Properties can also be set in the build, by passing them as environment variables. It's important to mention that environment variables have precedence over the orangebeard.json definition.

$ export ORANGEBEARD_ENDPOINT=https://company.orangebeard.app
$ export ORANGEBEARD_ACCESSTOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
$ export ORANGEBEARD_PROJECT=piet_personal
$ export ORANGEBEARD_TESTSET=piet_TEST_EXAMPLE
$ export ORANGEBEARD_DESCRIPTION=My awesome testrun
$ export ORANGEBEARD_ATTRIBUTES=key:value; value;

Tips & tricks

We would advise you to always use the Jest describe method around a set of tests, even if it's just one test. In that way the listener creates a suite. If you still don't want to use the describe method then the default suite name is Suite plus your test name.

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago