You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-145Lines changed: 0 additions & 145 deletions
Original file line number
Diff line number
Diff line change
@@ -126,151 +126,6 @@ module.exports = {
126
126
}
127
127
```
128
128
129
-
#### babelConfig
130
-
131
-
Provide `babelConfig` in one of the following formats:
132
-
133
-
-`<Boolean>`
134
-
-`<Object>`
135
-
-`<String>`
136
-
137
-
##### Boolean
138
-
139
-
-`true` - Enable Babel processing. `vue-jest` will try to find Babel configuration using [find-babel-config](https://www.npmjs.com/package/find-babel-config).
140
-
141
-
> This is the default behavior if [babelConfig](#babelconfig) is not defined.
142
-
143
-
-`false` - Skip Babel processing entirely:
144
-
145
-
```json
146
-
{
147
-
"jest": {
148
-
"globals": {
149
-
"vue-jest": {
150
-
"babelConfig": false
151
-
}
152
-
}
153
-
}
154
-
}
155
-
```
156
-
157
-
##### Object
158
-
159
-
Provide inline [Babel options](https://babeljs.io/docs/en/options):
160
-
161
-
```json
162
-
{
163
-
"jest": {
164
-
"globals": {
165
-
"vue-jest": {
166
-
"babelConfig": {
167
-
"presets": [
168
-
[
169
-
"env",
170
-
{
171
-
"useBuiltIns": "entry",
172
-
"shippedProposals": true
173
-
}
174
-
]
175
-
],
176
-
"plugins": ["syntax-dynamic-import"],
177
-
"env": {
178
-
"test": {
179
-
"plugins": ["dynamic-import-node"]
180
-
}
181
-
}
182
-
}
183
-
}
184
-
}
185
-
}
186
-
}
187
-
```
188
-
189
-
##### String
190
-
191
-
If a string is provided, it will be an assumed path to a babel configuration file (e.g. `.babelrc`, `.babelrc.js`).
192
-
193
-
- Config file should export a Babel configuration object.
194
-
- Should _not_ point to a [project-wide configuration file (babel.config.js)](https://babeljs.io/docs/en/config-files#project-wide-configuration), which exports a function.
195
-
196
-
```json
197
-
{
198
-
"jest": {
199
-
"globals": {
200
-
"vue-jest": {
201
-
"babelConfig": "path/to/.babelrc.js"
202
-
}
203
-
}
204
-
}
205
-
}
206
-
```
207
-
208
-
To use the [Config Function API](https://babeljs.io/docs/en/config-files#config-function-api), use inline options instead. i.e.:
209
-
210
-
```json
211
-
{
212
-
"jest": {
213
-
"globals": {
214
-
"vue-jest": {
215
-
"babelConfig": {
216
-
"configFile": "path/to/babel.config.js"
217
-
}
218
-
}
219
-
}
220
-
}
221
-
}
222
-
```
223
-
224
-
#### tsConfig
225
-
226
-
Provide `tsConfig` in one of the following formats:
227
-
228
-
-`<Boolean>`
229
-
-`<Object>`
230
-
-`<String>`
231
-
232
-
##### Boolean
233
-
234
-
-`true` - Process TypeScript files using custom configuration. `vue-jest` will try to find TypeScript configuration using [tsconfig.loadSync](https://www.npmjs.com/package/tsconfig#api).
235
-
236
-
> This is the default behavior if [tsConfig](#tsConfig) is not defined.
237
-
238
-
-`false` - Process TypeScript files using the [default configuration provided by vue-jest](https://github.com/vuejs/vue-jest/blob/master/lib/load-typescript-config.js#L5-L27).
239
-
240
-
##### Object
241
-
242
-
Provide inline [TypeScript compiler options](https://www.typescriptlang.org/docs/handbook/compiler-options.html):
243
-
244
-
```json
245
-
{
246
-
"jest": {
247
-
"globals": {
248
-
"vue-jest": {
249
-
"tsConfig": {
250
-
"importHelpers": true
251
-
}
252
-
}
253
-
}
254
-
}
255
-
}
256
-
```
257
-
258
-
##### String
259
-
260
-
If a string is provided, it will be an assumed path to a TypeScript configuration file:
261
-
262
-
```json
263
-
{
264
-
"jest": {
265
-
"globals": {
266
-
"vue-jest": {
267
-
"tsConfig": "path/to/tsconfig.json"
268
-
}
269
-
}
270
-
}
271
-
}
272
-
```
273
-
274
129
#### templateCompiler
275
130
276
131
You can provide [TemplateCompileOptions](https://github.com/vuejs/component-compiler-utils#compiletemplatetemplatecompileoptions-templatecompileresults) in `templateCompiler` section like this:
0 commit comments