codeceptjs / codeceptjs/CodeceptJS
How to custom _beforeStep
Open
- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 757
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Description
#### What are you trying to achieve?
I want to add custom function into _beforeStep hook, I try to follow the instruction:
1. Generate a custom helper:
```
const { Helper } = require('codeceptjs');
class HookHelper extends Helper {
_beforeStep() {
console.log("Hello")
}
}
module.exports = HookHelper;
```
2. Add above custom helper into ```codecept.conf.js```
```
HookHelper: {
require: './helper.js',
},
```
#### What do you get instead?
It did not console.log
* CodeceptJS version: 2.6.1
* NodeJS Version: v10.16.0
* Operating System: Windows 10
* PlayWright 0.12.1
Contributor guide
Assessment
This issue has not been assessed yet.