From d5962707223b11b704fde3cb1484c983a7dd58ce Mon Sep 17 00:00:00 2001 From: DavertMik Date: Mon, 6 Jul 2026 01:36:02 +0300 Subject: [PATCH] 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 --- lib/helper/GraphQL.js | 8 -------- lib/helper/GraphQLDataFactory.js | 9 --------- 2 files changed, 17 deletions(-) diff --git a/lib/helper/GraphQL.js b/lib/helper/GraphQL.js index 5286b85b2..9c0a0cc9a 100644 --- a/lib/helper/GraphQL.js +++ b/lib/helper/GraphQL.js @@ -53,14 +53,6 @@ class GraphQL extends Helper { this.axios.defaults.headers = this.options.defaultHeaders } - static _checkRequirements() { - try { - require('axios') - } catch (e) { - return ['axios'] - } - } - static _config() { return [ { diff --git a/lib/helper/GraphQLDataFactory.js b/lib/helper/GraphQLDataFactory.js index 75dc5185f..2195a7130 100644 --- a/lib/helper/GraphQLDataFactory.js +++ b/lib/helper/GraphQLDataFactory.js @@ -174,15 +174,6 @@ class GraphQLDataFactory extends Helper { Object.keys(this.factories).forEach(f => (this.created[f] = [])) } - static _checkRequirements() { - try { - require('axios') - require('rosie') - } catch (e) { - return ['axios', 'rosie'] - } - } - _after() { if (!this.config.cleanup) { return Promise.resolve()