CodeSampleX

サンプル

Demonstrate that Babel throws a generic Error when an unknown plugin name is used, contrary to the expected PluginError

sha256:46868fdc59f3c16f9dbd8dd754526c9fe4c8b9a188fc09a984a2de528082f8cd

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Demonstrate that Babel throws a generic Error when an unknown plugin name is used, contrary to the expected PluginError HOW
パッケージ
@babel/core 7.24.0
環境
node
作成日
2026-08-17T03:14:14Z

よくある思い込み

Providing an unknown plugin name to Babel’s transformSync throws a PluginError named 'PluginError'

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート