Midtrans-Middleware/tests
Tengku Achmad c32ac1882d feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation
- Added 'Inter' font to global CSS and Tailwind config for improved typography.
- Deleted unused test files related to payment link creation and Snap token testing.
- Created comprehensive README for server setup, API endpoints, and payment flow.
- Added testing documentation for easier integration and usage of the payment system.
2025-12-04 22:57:38 +07:00
..
README.md feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation 2025-12-04 22:57:38 +07:00
coreApiSimpleExample.js feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation 2025-12-04 22:57:38 +07:00
test-create-payment-link.cjs feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation 2025-12-04 22:57:38 +07:00
test-frontend-payload.cjs feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation 2025-12-04 22:57:38 +07:00
test-snap-token.cjs feat: update global styles and Tailwind configuration with Inter font; remove obsolete test files and add server documentation 2025-12-04 22:57:38 +07:00

README.md

Tests

Folder ini berisi file-file testing untuk Simaya Midtrans Payment Integration.

File Testing

1. test-create-payment-link.cjs

Test untuk membuat payment link menggunakan endpoint /createtransaksi.

Cara menjalankan:

node tests/test-create-payment-link.cjs

Requirement:

  • Server harus running di http://localhost:8000
  • File temp/tmp-createtransaksi.json harus ada dengan payload yang valid

2. test-frontend-payload.cjs

Test untuk mensimulasikan payload dari frontend (CheckoutPage.tsx AutoSnapPayment).

Cara menjalankan:

node tests/test-frontend-payload.cjs

Requirement:

  • Server harus running di http://localhost:8000

3. test-snap-token.cjs

Test untuk mendapatkan Snap token dari Midtrans.

Cara menjalankan:

node tests/test-snap-token.cjs

Requirement:

  • Server harus running di http://localhost:8000

4. coreApiSimpleExample.js

Contoh sederhana penggunaan Midtrans Core API.

Cara menjalankan:

node tests/coreApiSimpleExample.js

Catatan

  • Semua test file menggunakan axios untuk HTTP requests
  • Pastikan server backend sudah running sebelum menjalankan test
  • File temporary/payload test ada di folder temp/