avajs/ava

Analyze source & test dependencies to figure out which tests to run (first)

開放

#1,986 建立於 2018年11月21日

 (12 則留言) (1 個反應) (0 位負責人)JavaScript (1,408 個分叉)batch import
:dollar: Funded on Issuehuntenhancementhelp wanted

倉庫指標

星標
 (20,600 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Just trying out AVA instead of Jest in a new monorepo project. I am configuring testing to be run as a pre-commit hook using husky and lint-staged.

I've run into a problem getting the appropriate tests run by ava during a commit. Previously, I would use lint-staged which would pass the changed files as arguments to jest and using the --findRelatedTests flag, jest would run only the tests that covered those files.

Trying to do something similar with ava has left me at a dead-end. If I try to use lint-staged to run ava, it passes a list of changed files and ava tries to run them as tests which fails. The alternative is simply to run the entire test suite, which will become inefficient as the project grows.

Any thing I'm missing, or thoughts on how to run appropriate ava tests as part of a pre-commit process?


Backers (Total: $80.00)

Submitted pull Requests


Become a backer now!

Or submit a pull request to get the deposits!

Tips

貢獻者指南