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

@babel/core internal test skips fail when citgm run locally

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, nodejs

調査の方向性

Start with lib/lookup.json, where the per-package citgm entries such as @babel/core and jose define their skip settings. The failures are in packages/babel-traverse/test/traverse.js, around the deprecated-types and deprecated-aliases tests that expect a console warning. Check how citgm runs the suite outside Jenkins, where the temp directory differs from NODE_TEST_DIR. Done means the proposed CITGM environment variable is set for these runs and those two tests are skipped only when it is true.

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

説明

Situation

When cigtm @babel/core is run outside of Node.js Jenkins CI, it fails to skip tests that it intended to skip for citgm.

error:                     |
error:                     | Summary of all failing tests
error:                     | FAIL packages/babel-traverse/test/traverse.js
error:                     | traverse > traverse.explode > deprecated types and aliases > should warn for deprecated node types
error:                     | Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
error:                     |
error:                     | Expected: StringMatching /Visitor `NumberLiteral` has been deprecated, please migrate to `NumericLiteral`[^]+at.+testFn1/
error:                     |
error:                     | Number of calls: 0
error:                     | at testFn1 (file:///tmp/be09bd18/@babel/core/packages/babel-traverse/test/traverse.js?1791788834095:513:30)
error:                     | at async file:///tmp/be09bd18/@babel/core/node_modules/tinypool/dist/esm/entry/worker.js:72:20
error:                     |
error:                     | traverse > traverse.explode > deprecated types and aliases > should warn for deprecated aliases
error:                     | Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
error:                     |
error:                     | Expected: StringMatching /Visitor `ModuleDeclaration` has been deprecated, please migrate to `ImportOrExportDeclaration`[^]+at.+testFn2/
error:                     |
error:                     | Number of calls: 0
error:                     | at testFn2 (file:///tmp/be09bd18/@babel/core/packages/babel-traverse/test/traverse.js?1791788834095:529:30)
error:                     | at async file:///tmp/be09bd18/@babel/core/node_modules/tinypool/dist/esm/entry/worker.js:72:20
error:                     |
error:                     |
error:                     | Test Suites: 1 failed, 275 passed, 276 total
error:                     | Tests:       2 failed, 16 skipped, 36969 passed, 36987 total

In Node.js Jenkins CI citgm-smoker sets:

temp="$NODE_TEST_DIR"/citgm_tmp

This is however not generally the case if citgm is run in GitHub Actions or on a local system.

In the above example from Ubuntu on GitHub Actions the temp directory is /tmp/be09bd18 and the tests are not skipped.

Suggestion

Add an environment variable CITGM set to true into

https://github.com/nodejs/citgm/blob/37e15454ddfe5aba91955062b7899114c528e7d1/lib/lookup.json#L2-L8

and skip tests in @babel/core based on this environment variable as necessary.

This is used by jose, for example:

https://github.com/nodejs/citgm/blob/37e15454ddfe5aba91955062b7899114c528e7d1/lib/lookup.json#L229-L235

cc: @nicolo-ribaudo @JLHwung @liuxingbaoyu

主要言語
JavaScript
スター
608
フォーク
158
平均マージ
2日 17時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

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

nodejs/citgm のほかの issue

nodejs/citgm の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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