Skip to content

Commit 963967e

Browse files
authored
Merge pull request #9 from codeceptjs/kobenguyent-patch-1
fix: some methods to adapt with codeceptjs
2 parents d4cffad + f36bfb9 commit 963967e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class Helper {
178178
get helpers() {
179179
// @ts-ignore
180180
const { container } = global.codeceptjs || require('codeceptjs');
181-
return container.helpers();
181+
return container.default ? container.default.helpers() :container.helpers();
182182
}
183183

184184
/**
@@ -189,7 +189,7 @@ class Helper {
189189
debug(msg: string) {
190190
// @ts-ignore
191191
const { output } = global.codeceptjs || require('codeceptjs');
192-
output.debug(msg);
192+
output.output ? output.output.debug(msg) : output.debug(msg);
193193
}
194194

195195
/**
@@ -199,8 +199,8 @@ class Helper {
199199
debugSection(section: any, msg: string) {
200200
// @ts-ignore
201201
const { output } = global.codeceptjs || require('codeceptjs');
202-
output.debug(`[${section}] ${msg}`);
202+
output.output ? output.output.debug(`[${section}] ${msg}`) : output.debug(`[${section}] ${msg}`);
203203
}
204204
}
205205

206-
export = Helper;
206+
export = Helper;

0 commit comments

Comments
 (0)