Skip to content

fix(billing): billing store tests fail — config.api.endPoints.billing is undefined in test env #3738

Closed

Description

@PierreBrisorgueil

Problem

Billing store unit tests fail because config.api.endPoints.billing resolves to undefined at test time, producing URLs like http://localhost:3000/api/undefined/subscription instead of http://localhost:3000/api/billing/subscription.

Failing tests (3):

  • fetchSubscription > should call correct API endpoint
  • createCheckout > should send correct payload with priceId and redirect URLs
  • fetchPlans > should call correct API endpoint (similar pattern)

Affected file(s)

  • src/modules/billing/tests/billing.store.unit.tests.js
  • src/modules/billing/stores/billing.store.js
  • Config generation / test config merge

Steps to reproduce

  1. Fresh clone of devkit-vue master
  2. npm install
  3. npm run test:unit
  4. Billing store tests fail with URL mismatch (undefined where billing should be)

Activity

  1. PierreBrisorgueil commented on Mar 18, 2026

    @PierreBrisorgueil
    CollaboratorAuthor

    Already fixed on master — the billing endpoint config was added in #3733. All 655 tests pass including billing store tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions