Skip to content

example when ionic standalone component doesnt work with jest

Notifications You must be signed in to change notification settings

Squixx/jest-ionic-standalone

Repository files navigation

example that with jest, even when using

  transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/|\\.pnpm/?!.*\\.mjs$|(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)'],

import { Platform } from '@ionic/angular/standalone'; // This doesnt work // import { Platform } from '@ionic/angular'; // This works

update

  transformIgnorePatterns: [
    '<rootDir>/node_modules/.pnpm/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)@)',
  ],  

works for this, see the tip about pnpm here:

https://jestjs.io/docs/configuration#transformignorepatterns-arraystring

About

example when ionic standalone component doesnt work with jest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published