Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bad order (place) if is used hooks

オープン
#3,095 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
testing

調査の方向性

示されているヘルパーフックを使い、npx codeceptjs run --steps--steps なしの同じコマンドでレポートを再現します。_beforeSuite_beforeStep_before_passed_failed のコンソール上の順序を比較します。完了条件は、他のフックの順序が正しいまま、passed フックの出力が成功ステータスより前に表示されることです。

索引モデルが issue の本文から書いたものです。

説明

stale

CodeceptJS v3.1.3

I try create file with helper, thats contains:

_beforeSuite() {
console.log('This text must be before feature string, but is after feature string')
}

_beforeStep() {
console.log('This text must be before each step and page object')
}

_before() {
console.log('This text must be before scenario string, but is after scenario string')
}

_passed() {
console.log('This text must be before OK status, but is after OK status')
}

_failed() {
console.log('This text must be before fail status and is before status - working correctly')
}

when i run codecept as
npx codeceptjs run --steps

i got in console:
CodeceptJS v3.1.3
Using test root "C:_git\sandbox"

Typescript Example1 --
This text must be before feature string, but is after feature string
test something
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page
This text must be before each step and page object
homePage: goToHome
I am on page "/"
This text must be before each step and page object
I print message "Helper message Pavel"
Helper message Pavel
This text must be before each step and page object
loginPage: link
I wait for visible "body"
This text must be before each step and page object
I print helpers
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
I fill field "user_email", "something@totest.com"
This text must be before each step and page object
I wait 2
√ OK in 5177ms

This text must be before OK status, but is after OK status
po kazdym scenari (describe)
test something2
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page2
This text must be before each step and page object
homePage: goToHome
I am on page "/"
This text must be before each step and page object
I print message "Helper message Pavel2"
Helper message Pavel2
This text must be before each step and page object
loginPage: link
I wait for visible "body"
This text must be before each step and page object
I print helpers
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
I fill field "user_email", "something@totest2.com"
This text must be before each step and page object
I wait 2
This text must be before each step and page object
I see "pokus"
This text must be before fail status and is before status - working correctly
× FAILED in 8761ms

when runing without --steps

Typescript Example1 --
This text must be before feature string, but is after feature string
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page
This text must be before each step and page object
This text must be before each step and page object
Helper message Pavel
This text must be before each step and page object
This text must be before each step and page object
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
This text must be before each step and page object
√ test something in 5294ms
This text must be before OK status, but is after OK status
po kazdym scenari (describe)
This text must be before scenario string, but is after scenario string
From homePage neco
Login Page2
This text must be before each step and page object
This text must be before each step and page object
Helper message Pavel2
This text must be before each step and page object
This text must be before each step and page object
Helpers enabled hokus [ 'Playwright', 'CustomHelper', 'HokusHelper' ]
This text must be before each step and page object
This text must be before each step and page object
This text must be before each step and page object
This text must be before fail status and is before status - working correctly
× test something2 in 8677ms

I mean, console.logs used in hooks, must be visible before features and scenario in console. And _failed() working correctly, but _passed() is not...

主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。