Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Commit 1d8adb6

Browse files
committed
add few plugins to babel parser
1 parent d8f325b commit 1d8adb6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jest-mock-external-components",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Mock external React components with jest",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

src/get_mocks.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ export function getMocks(code: string, type: "flow" | "typescript", alwaysMock:
220220
type,
221221
"asyncGenerators",
222222
"classProperties",
223+
"classPrivateProperties",
224+
"classPrivateMethods",
223225
["decorators", { decoratorsBeforeExport: true }] as any,
224226
"doExpressions",
225227
"dynamicImport",
@@ -231,6 +233,8 @@ export function getMocks(code: string, type: "flow" | "typescript", alwaysMock:
231233
"exportNamespaceFrom",
232234
"importMeta",
233235
"optionalCatchBinding",
236+
"optionalChaining",
237+
"nullishCoalescingOperator"
234238
],
235239
});
236240
if (!ast) {

0 commit comments

Comments
 (0)