codeceptjs / codeceptjs/CodeceptJS

How to custom _beforeStep

Aperta
#2,339 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
4.2k
Fork
757
Merge medio
2g 9h
PR unite (30g)
16

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.