Automatically generate missing expected.js fixtures (#4735)
This is much like Babylon's existing behavior around `expected.json`. The equivalent of babel/babylon#188 is already applied here, to guard against silent failure (and a potential false positive) if a test is accidentally committed without its expected.js.
This commit is contained in:
committed by
Daniel Tschinder
parent
478bba0ade
commit
b8eeddf960
@@ -145,9 +145,9 @@ If you need to check for an error that is thrown you can add to the `options.jso
|
||||
}
|
||||
```
|
||||
|
||||
##### `babylon`
|
||||
##### Bootstrapping expected output
|
||||
|
||||
For `babylon` specifically, you can easily generate an `expected.json` automatically by just providing the `actual.js` and running `make test-only` as you usually would.
|
||||
For both `babel-plugin-x` and `babylon`, you can easily generate an `expected.js`/`expected.json` automatically by just providing `actual.js` and running the tests as you usually would.
|
||||
|
||||
```
|
||||
// Example
|
||||
|
||||
Reference in New Issue
Block a user