0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

sl(Steam Locomotive)を入れてるとjestがwatchモードで動かない!

Posted at

要するに

ターミナルで蒸気機関車を走らせることができるジョークコマンド(Steam Locomotive)と、saplingのコマンド名がコンフリクトしている(どっちもslな)ので、Steam Locomotiveをインストールしていると jest --watch が正常に起動しません。

BugFixについてはv30から入るようです。

Steam Locomotiveって

lsslとタイポしたときに、ターミナルに蒸気機関車が走るというジョークコマンドです。

gifイメージ

https://github.com/mtoyoda/sl より引用。

ジョークコマンドの一つとして、QiitaやZennなどでも取り上げられるのを見ますね。

何が起きたのか

Steam Locomotive を入れた環境で jest --watchテストを流すと動きません!

npx jest --watch
Determining test suites to run...

  ● Test suite failed to run

thrown: [Error]

詳しい理由

冒頭の通り、slというコマンド名が Steam Locomotivesapling(Meta謹製のソースコード管理システム)のコマンド名が重複しています。

もう少し具体的には jest-changed-files が gitやsaplingなどいくつかのソースコード管理システムによる差分検知をサポートしており、slコマンドも入っていれば利用してくれます。
ここで名前がコンフリクトしているのでSteam Locomotiveを利用している人は蒸気機関車が走ってしまい、エラーになるというわけです。

Bugfixについて

こちらのPRで修正されています。slSteam Locomotive なら処理をスキップするようになっています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?