الانتقال إلى المحتوى الرئيسي
الأكاديمية
مبتدئ حيّ الكود

الاختبارات

أطلق بثقة: اختبارات الوحدات والتكامل والاختبارات الشاملة.

Tests are code that checks your code, so you can change things without fear. This track starts with your first expect in Vitest and ends with a team's whole safety net: clear unit tests, edge cases and boundaries, test doubles for time and randomness, an integration test for a Go web handler, end-to-end tests that drive a real browser with Playwright, flaky tests and how to kill them, and the red, green, refactor loop of TDD.

Examples use TypeScript with Vitest, one Go test and Playwright, all on the features of a small social app called Nova: points, tiers, leaderboards, sign-ups and posts. Basic JavaScript or TypeScript is all you need to start.

الدروس
١٤
الوقت
٢ ساعة
المستوى
مبتدئ

دروس هذا المسار بالإنجليزية حاليًا.

  • البرونز متاحة
  • الفضة متاحة
  • الذهب مقفلة

مستعد لإثبات نفسك؟

ثلاثة امتحانات في انتظارك: البرونز والفضة والذهب.

إلى الامتحانات

ما ستتمكن من فعله

  • Write clear unit tests with Vitest's describe, it and expect
  • Hunt edge cases and test both sides of every boundary
  • Replace clocks, randomness and email with test doubles
  • Test a Go HTTP handler with httptest
  • Drive a real browser with Playwright, without sleeps or hardcoded ports
  • Work in a red, green, refactor loop and read coverage wisely

الرحلة

  1. ١
    الوحدة ١

    Your first tests

    Why tests matter, the shape of a good test, edge cases and test doubles.

    ٠ / ٥
  2. ٢
    الوحدة ٢

    Testing like a team

    The test pyramid, integration and end-to-end tests, flaky tests and TDD.

    ٠ / ٥
  3. ٣
    الوحدة ٣

    The road ahead

    Beyond the basics: property-based tests, contract tests, mutation testing and load tests.

    ٠ / ٤

التنقل السريع