Skip to content

Commit 15c54fb

Browse files
Add information on gulp diff to the contributing guidelines (#42031)
* Add information on gulp diff to the contributing guidelines * Update CONTRIBUTING.md * Update CONTRIBUTING.md Co-authored-by: Daniel Rosenwasser <[email protected]>
1 parent a412512 commit 15c54fb

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

CONTRIBUTING.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,25 @@ import { f as g } from "file1";
189189
var x = g();
190190
```
191191

192-
## Managing the Baselines
192+
## Managing the baselines
193193

194-
Compiler tests generate baselines: one file each for the emitted `.js`, the errors produced by the compiler, the type of each expression, and symbol for each identifier. Additionally, some tests generate baselines for the source map output.
194+
Most tests generate "baselines" to find differences in output.
195+
As an example, compiler tests usually emit one file each for
196+
197+
- the `.js` and `.d.ts` output (all in the same `.js` output file),
198+
- the errors produced by the compiler (in an `.errors.txt` file),
199+
- the types of each expression (in a `.types` file),
200+
- the symbols for each identifier (in a `.symbols` file), and
201+
- the source map outputs for files if a test opts into them (in a `.js.map` file).
195202

196203
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
197204

198205
```Shell
199-
gulp diff
206+
git diff --diff-filter=AM --no-index ./tests/baselines/reference ./tests/baselines/local
200207
```
201208

209+
Alternatively, you can set the `DIFF` environment variable and run `gulp diff`, or manually run your favorite folder diffing tool between `tests/baselines/reference` and `tests/baselines/local`. Our team largely uses Beyond Compare and WinMerge.
210+
202211
After verifying that the changes in the baselines are correct, run
203212

204213
```Shell

0 commit comments

Comments
 (0)