Skip to content

Commit

Permalink
docs: created a changelog file
Browse files Browse the repository at this point in the history
  • Loading branch information
ncpa0cpl committed Apr 24, 2023
1 parent faba812 commit 8002db8
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## 0.1.0 (April 24, 2023)

### Features

- #### feat: added support for custom reporters ([#7](https://github.com/react-gjs/gest/pull/7))

- config files can now be in a `.js` or `.mjs` format
- error message parsing can be customized via a new config property `errorReporterParser`
- gest console output can now be customized via a new config property `reporters`

Custom reporter example:
```ts
// gest.config.js

export default async ({ importModule }) => {
const { BaseReporter } = await importModule("@reactgjs/gest/base-reporter");

class CustomReporter extends BaseReporter {
reportSuiteState(suiteState) {
// generate a Test Suite report
}

reportUnitState(unitState) {
// generate a Test Unit report
}

reportSuiteError(errReport, suiteState) {
// generate an Error report
}

reportUnitError(errReport, unitState) {
// generate an Error report
}

printStateReports() {
// print collected state reports
}

printErrorReports() {
// print collected error reports
}
}

return {
testDir: "__tests__",
srcDir: "src",
reporters: [CustomReporter]
// alternatively, keep the default reporter as is:
// reporters: ["default", CustomReporter]
}
}
```

### Bug Fixes

- #### Fix/log interceptor and diff patches ([#4](https://github.com/react-gjs/gest/pull/4))

Because all logs within tests are intercepted and logged only after all test runs have finished, if an object was logged and then mutated after, in logs that object would be printed with the changes that happened after it was console.log'ed.

This now has been fixed, all values given to the log function will now be deeply copied, so mutating them afterwards will not have any effect on the printed output.

0 comments on commit 8002db8

Please sign in to comment.