codeceptjs / codeceptjs/CodeceptJS

How to custom _beforeStep

Đang mở
#2,339 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.