playwright test

built-in
0.0% Savings
0 Commands
0 Tokens saved
2 Tests

Install

tokf install 972e3a338cf97f71d3cd4ad277581200fe7da0b3da89cd2c4e49400de7edbcae
Safety checks passed

Filter definition

command = ["playwright test", "npx playwright test"]
strip_ansi = true
skip = [
  "^\\s*$",
  "^Running \\d+ tests? using",
  "^\\s*[✓✗◼].*\\[\\d+/\\d+\\]",
  "^Slow test file",
  "^\\s*\\d+ passed",
  "^\\s*\\d+ skipped",
]

[on_success]
output = "ok ✓ playwright: all tests passed"

[on_failure]
tail = 50

Examples

failing tests show error details ~228 tokens → ~129 tokens (43% saved)
Raw output
Running 5 tests using 2 workers

  ✓ [1/5] auth.spec.ts:5:1 › should login successfully (2.1s)
  ✗ [2/5] auth.spec.ts:15:1 › should logout (1.3s)
  ✓ [3/5] payroll.spec.ts:8:1 › should display payroll table (3.2s)
  ✓ [4/5] payroll.spec.ts:20:1 › should calculate totals (2.8s)
  ✓ [5/5] dashboard.spec.ts:5:1 › should load dashboard (1.5s)

  1) auth.spec.ts:15:1 › should logout ──────────────────────────────

    Error: expect(received).toBeVisible()

    Expected: visible
    Received: hidden

      14 |   test('should logout', async ({ page }) => {
      15 |     await page.click('[data-testid="logout-btn"]');
    > 16 |     await expect(page.locator('.login-form')).toBeVisible();
         |                                                ^
      17 |   });

    at /tests/auth.spec.ts:16:48

  4 passed, 1 failed (10.9s)
Filtered output
  1) auth.spec.ts:15:1 › should logout ──────────────────────────────
    Error: expect(received).toBeVisible()
    Expected: visible
    Received: hidden
      14 |   test('should logout', async ({ page }) => {
      15 |     await page.click('[data-testid="logout-btn"]');
    > 16 |     await expect(page.locator('.login-form')).toBeVisible();
         |                                                ^
      17 |   });
    at /tests/auth.spec.ts:16:48
all tests pass collapses to single line ~95 tokens → ~8 tokens (92% saved)
Raw output
Running 5 tests using 2 workers

  ✓ [1/5] auth.spec.ts:5:1 › should login successfully (2.1s)
  ✓ [2/5] auth.spec.ts:15:1 › should logout (1.3s)
  ✓ [3/5] payroll.spec.ts:8:1 › should display payroll table (3.2s)
  ✓ [4/5] payroll.spec.ts:20:1 › should calculate totals (2.8s)
  ✓ [5/5] dashboard.spec.ts:5:1 › should load dashboard (1.5s)

  5 passed (11.2s)
Filtered output
ok ✓ playwright: all tests passed
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters