Skip to content

Commit 91e6cf2

Browse files
authored
docs(angular): note jest transformIgnorePatterns for es modules
1 parent 37e5f6d commit 91e6cf2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/angular/build-options.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,17 @@ export class HomePage {}
175175
<ion-button routerLink="/foo" routerDirection="root">Go to Foo Page</ion-button>
176176
```
177177

178+
**Testing**
179+
180+
Ionic Angular's standalone components use ES Modules. As a result, developers using Jest should ensure that ES Modules are transpiled to a format that Jest can use. Developers using Jest should add the following to their Jest config:
181+
182+
```json
183+
{
184+
...,
185+
"transformIgnorePatterns": ["node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)"]
186+
}
187+
```
188+
178189
### Usage with NgModule-based Applications
179190

180191
:::caution

0 commit comments

Comments
 (0)