Skip to content

test(core): add automated test suite #53

@usernane

Description

@usernane

Problem

No automated tests in the repository.

Suggestion

Add tests using Jest or Mocha with a mock server.

Test Coverage Should Include

  • All HTTP methods (GET, POST, PUT, DELETE)
  • Callback execution order
  • Error handling scenarios
  • CSRF token extraction
  • Retry mechanism
  • Parameter serialization
  • URL validation

Example Structure

/tests
  ajax.test.js
  callbacks.test.js
  csrf.test.js
  retry.test.js

Recommended Setup

{
  "scripts": {
    "test": "jest"
  },
  "devDependencies": {
    "jest": "^29.0.0",
    "jest-environment-jsdom": "^29.0.0"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions