codeceptjs / codeceptjs/CodeceptJS

How to custom _beforeStep

未關閉
#2,339 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
4.2k
分支
757
平均合併
2 天 9 小時
30 天內合併 PR
16

描述

#### 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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。