microsoft / microsoft/TypeScript

Defer baseline comparisons until end of test

未关闭
#63,777 0 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

Currently if you re-enable all failing fourslash tests (by clearing out `failedtests.txt`) and run

```sh
npm run convertfourslash
hereby baseline-accept
```

You'll get a baseline file for `internal/fourslash/tests/gen/findReferencesAfterEdit_test.go`

However, if you run `npm run updatefailing`, that test is still disabled in `failedtests.txt`.

I think it is possibly due to a bug in the baselining logic. My guess is that baselining is currently too eager. Any test that requests multiple baselines where an edit has occurred in between probably fails because any of the following might be true:

1. the baselines were never accepted so the test could never succeed
2. the second baseline call will always read the results of the first baseline, and is assumed to fail
3. the second baseline was accepted, so the first call will always fail

I think we look at the original infrastructure for fourslash, every test actually compared against calculated baselines at the end of the test run. (I could be wrong though.)

_Originally posted by @DanielRosenwasser in https://github.com/microsoft/typescript-go/pull/1450#discussion_r2229480973_

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。