Skip to content

Commit

Permalink
Merge pull request #9 from codeceptjs/kobenguyent-patch-1
Browse files Browse the repository at this point in the history
fix: some methods to adapt with codeceptjs
  • Loading branch information
kobenguyent authored Mar 7, 2024
2 parents d4cffad + f36bfb9 commit 963967e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class Helper {
get helpers() {
// @ts-ignore
const { container } = global.codeceptjs || require('codeceptjs');
return container.helpers();
return container.default ? container.default.helpers() :container.helpers();
}

/**
Expand All @@ -189,7 +189,7 @@ class Helper {
debug(msg: string) {
// @ts-ignore
const { output } = global.codeceptjs || require('codeceptjs');
output.debug(msg);
output.output ? output.output.debug(msg) : output.debug(msg);
}

/**
Expand All @@ -199,8 +199,8 @@ class Helper {
debugSection(section: any, msg: string) {
// @ts-ignore
const { output } = global.codeceptjs || require('codeceptjs');
output.debug(`[${section}] ${msg}`);
output.output ? output.output.debug(`[${section}] ${msg}`) : output.debug(`[${section}] ${msg}`);
}
}

export = Helper;
export = Helper;

0 comments on commit 963967e

Please sign in to comment.