Skip to content

Commit

Permalink
Merge pull request #7 from DamianOsipiuk/error-handling
Browse files Browse the repository at this point in the history
Error handling, tests
  • Loading branch information
Damian Osipiuk authored Jul 7, 2020
2 parents 026d786 + 3cf903b commit a489a36
Show file tree
Hide file tree
Showing 7 changed files with 5,926 additions and 127 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
lib
lib
coverage
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ Configuration can be provided via:
- ENV variables
- configuration file (.testrailrc)

## Configuring via `ENV`

| ENV Variable | Config | Description | Default | Required |
| ----------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------: | :------: |
| TESTRAIL_ENABLED | enabled | Enables TestRail integration. | `false` | |
Expand All @@ -57,7 +55,7 @@ Configuration can be provided via:
| TESTRAIL_CASE_META | caseMeta | Meta attribute to be used to get TestRail case id mapping. | `'CID'` | |
| TESTRAIL_RUN_NAME | runName | Test Run name. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li><li>`%DATE%` - see config option `dateFormat`</li></ul> | `%BRANCH%#%BUILD% - %DATE%` | |
| TESTRAIL_RUN_DESCRIPTION | runDescription | You can provide you own Test Run description. If this option is not configured, it will contain test results and test coverage. | | |
| TESTRAIL_REFERENCE | reference | String that will be added to the `refs` field in TestRail. This can enable integration with other tools like https://github.com/DamianOsipiuk/testcafe-reporter-testrail/. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li></ul> | | |
| TESTRAIL_REFERENCE | reference | String that will be added to the `refs` field in TestRail. This can enable integration with other tools like https://github.com/DamianOsipiuk/jest-reporter-testrail/. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li></ul> | | |
| TESTRAIL_BRANCH_ENV | branchEnv | Which ENV variable is used to store branch name on which tests are run. | `BRANCH` | |
| TESTRAIL_BUILD_NO_ENV | buildNoEnv | Which ENV variable is used to store build number of tests run. | `BUILD_NUMBER` | |
| TESTRAIL_DATE_FORMAT | dateFormat | What date format should be used for `%DATE%` placeholder. https://momentjs.com/ formats supported. | `YYYY-MM-DD HH:mm:ss` | |
Expand Down
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { jsWithTs } = require("ts-jest/presets");

module.exports = {
collectCoverage: true,
moduleFileExtensions: ["ts", "js"],
testRegex: ".test.ts$",
transform: {
...jsWithTs.transform,
},
};
Loading

0 comments on commit a489a36

Please sign in to comment.