Skip to content

Commit d596270

Browse files
DavertMikclaude
andcommitted
fix(graphql): drop ESM-broken _checkRequirements() so check works (#5654)
_checkRequirements() called require('axios'), which is undefined in ESM. The ReferenceError was caught and reported the deps as missing, so `npx codeceptjs check` failed with a false 'axios not installed' error. Both call sites (container.js, init.js) guard with `if (._checkRequirements)`, and missing deps already fail at import time, so the method is just removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7cb68de commit d596270

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

lib/helper/GraphQL.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ class GraphQL extends Helper {
5353
this.axios.defaults.headers = this.options.defaultHeaders
5454
}
5555

56-
static _checkRequirements() {
57-
try {
58-
require('axios')
59-
} catch (e) {
60-
return ['axios']
61-
}
62-
}
63-
6456
static _config() {
6557
return [
6658
{

lib/helper/GraphQLDataFactory.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,6 @@ class GraphQLDataFactory extends Helper {
174174
Object.keys(this.factories).forEach(f => (this.created[f] = []))
175175
}
176176

177-
static _checkRequirements() {
178-
try {
179-
require('axios')
180-
require('rosie')
181-
} catch (e) {
182-
return ['axios', 'rosie']
183-
}
184-
}
185-
186177
_after() {
187178
if (!this.config.cleanup) {
188179
return Promise.resolve()

0 commit comments

Comments
 (0)