Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Docs: Expect helper config example fails in 4.x, and the sidebar links to the old 3.x page

未關閉 適合新手
#5,773 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
75/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript, node.js
領域
documentation

研究方向

閱讀引用的側邊欄項目附近的 docs/assertions.md、docs/helpers/ExpectHelper.md 和 astro.config.mjs;將過時的 src/content/docs/helpers/expect.md 與目前的 expect-helper 頁面核對。更新 Expect Helper 範例,使其使用 issue 中所示的 package 設定,並讓側邊欄指向目前的頁面。當文件中的兩個範例都能在 4.x package 設定下載入,且側邊欄連結到目前的頁面時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

In 4.x the Expect helper is no longer built in; it is the separate package @codeceptjs/expect-helper. The docs still show the 3.x config, which fails to load in 4.x.

1. The config example is wrong

https://codecept.io/helpers/expect-helper and the "Quick Assertions with Expect Helper" section of https://codecept.io/assertions both show:

helpers: {
  Playwright: { /* ... */ },
  ExpectHelper: {},
}

Without require, getHelperModuleName() in lib/container.js resolves the key to the built-in path ./helper/ExpectHelper, which doesn't exist in 4.x. Either of these works:

ExpectHelper: { require: '@codeceptjs/expect-helper' },
// or, because a key starting with @codeceptjs/ is used as the module name:
'@codeceptjs/expect-helper': {},

Sources:

  • docs/assertions.md (around line 100)
  • docs/helpers/ExpectHelper.md, which is generated from the JSDoc example in codeceptjs/expect-helper index.js ("Zero-configuration when paired with other helpers..."). The package's own README already shows the require form.

2. The sidebar links to the old 3.x page

The "Expect" item under Helpers points to https://codecept.io/helpers/expect, an older copy of the page (title "Expect", config Expect: {}). The current page is https://codecept.io/helpers/expect-helper, which the sidebar doesn't link to.

In codeceptjs/website:

  • astro.config.mjs:311: {label: 'Expect', link: 'helpers/expect'}
  • src/content/docs/helpers/expect.md is the stale page. expect-helper.md is the one synced from [email protected].

Environment: CodeceptJS 4.2.2, @codeceptjs/expect-helper 1.0.2


Created by AI agent (Claude Code)

主要語言
JavaScript
星號
4.2k
分支
754
平均合併
2 天 6 小時
30 天內合併 PR
33

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codeceptjs/CodeceptJS 的其他 Issue

查看 codeceptjs/CodeceptJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。