Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
From d7d5a42b4618cf634388480f1c354f4a022a0dbe Mon Sep 17 00:00:00 2001 From: ahnpnl <27772165+ahnpnl@users.noreply.github.com> Date: Thu, 1 Aug 2024 08:56:15 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thymikee?= =?UTF-8?q?/jest-preset-angular@8d0200e7c9f48180bb551d7284d1ce2e846dc8e7?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 4 ++-- assets/js/029bedf1.573997ce.js | 1 + assets/js/029bedf1.73a02698.js | 1 - assets/js/02a1e558.5e4485e9.js | 1 - assets/js/02a1e558.867dfe89.js | 1 + assets/js/03be7dae.76728443.js | 1 - assets/js/03be7dae.c96e9fd0.js | 1 + assets/js/04ae74d1.81158c40.js | 1 + assets/js/04ae74d1.f95b5ea8.js | 1 - assets/js/04b3fc6c.0ab9f51b.js | 1 + assets/js/04b3fc6c.c41ba507.js | 1 - assets/js/05916282.433934f3.js | 1 - assets/js/{a74b641e.58d36fc6.js => 05916282.5aebc1a7.js} | 2 +- assets/js/0d71a3f1.2592d896.js | 1 - assets/js/0d71a3f1.a7b070ca.js | 1 + assets/js/0dc350cc.9806f372.js | 1 + assets/js/0dc350cc.a1bac570.js | 1 - assets/js/0e35f71d.763548fa.js | 1 - assets/js/0e35f71d.eaeb1631.js | 1 + assets/js/13973f06.5c8d6bac.js | 1 + assets/js/13973f06.e0fb231f.js | 1 - assets/js/1438ea8f.20cef9a9.js | 1 - assets/js/1438ea8f.32651baa.js | 1 + assets/js/14b133ce.6d5e977a.js | 1 - assets/js/14b133ce.76fc65a0.js | 1 + assets/js/151633a5.6d6538de.js | 1 - assets/js/151633a5.7a966d53.js | 1 + assets/js/1a421168.5d3e194a.js | 1 + assets/js/1a421168.c4b0cdcb.js | 1 - assets/js/1a5572f6.4a787f14.js | 1 + assets/js/1a5572f6.9408d555.js | 1 - assets/js/1e388ac9.855a1c14.js | 1 + assets/js/1e388ac9.bead1dde.js | 1 - assets/js/203fc93e.7e67e571.js | 1 - assets/js/203fc93e.dd915af4.js | 1 + assets/js/22e4d634.2a53ad07.js | 1 - assets/js/22e4d634.64ab8474.js | 1 + assets/js/252e2b80.83874241.js | 1 - assets/js/252e2b80.d5c6b54b.js | 1 + assets/js/26cb42b7.64a67a02.js | 1 + assets/js/26cb42b7.f6f3005c.js | 1 - assets/js/27299a3b.f8d54705.js | 1 + assets/js/29d26392.3957b905.js | 1 + assets/js/29d26392.e3d1d3e7.js | 1 - assets/js/2ab18ce5.1153a5bf.js | 1 - assets/js/2ab18ce5.c4f26df5.js | 1 + assets/js/2ae17008.b7340f55.js | 1 - assets/js/2ae17008.d1e5b0ff.js | 1 + assets/js/2e81e74f.37678685.js | 1 + assets/js/2e81e74f.6f50883c.js | 1 - assets/js/30388853.0ed0efd9.js | 1 - assets/js/30388853.7a1b4582.js | 1 + assets/js/33a5adb4.997a0fe6.js | 1 + assets/js/33a5adb4.fc17da8d.js | 1 - assets/js/388d3430.1a49bf41.js | 1 - assets/js/388d3430.a5652915.js | 1 + assets/js/3c7caf67.22585c49.js | 1 + assets/js/3c7caf67.84b19da3.js | 1 - assets/js/407f8801.3567c935.js | 1 - assets/js/407f8801.c52003df.js | 1 + assets/js/433cefd8.1863f4db.js | 1 + assets/js/433cefd8.eeea9e06.js | 1 - assets/js/4351d34b.148b189a.js | 1 + assets/js/4351d34b.9b3f87b7.js | 1 - assets/js/44b4d73b.38153ec4.js | 1 - assets/js/44b4d73b.f4d6c60f.js | 1 + assets/js/47c825a2.63eee6aa.js | 1 - assets/js/47c825a2.8349d0ad.js | 1 + assets/js/47cccd8d.8ceb3e64.js | 1 + assets/js/47cccd8d.e5222f6d.js | 1 - assets/js/48dd39e2.ca15f0fc.js | 1 + assets/js/48dd39e2.ca6c5fb6.js | 1 - assets/js/494f4f5e.059a4ef6.js | 1 + assets/js/494f4f5e.085604ce.js | 1 - assets/js/4b3f866b.32e0394d.js | 1 + assets/js/4b3f866b.4470b289.js | 1 - assets/js/4e0c07c5.034f77e0.js | 1 + assets/js/4e0c07c5.78821343.js | 1 - assets/js/51d67042.010d5956.js | 1 - assets/js/51d67042.62598e74.js | 1 + assets/js/54071611.a9efa22a.js | 1 + assets/js/54071611.dd2d0bd2.js | 1 - assets/js/{27299a3b.4ce4434e.js => 54f44165.4c15eecd.js} | 2 +- assets/js/54f44165.61369b7f.js | 1 - assets/js/5635425a.afdf10b3.js | 1 + assets/js/56acf0ae.e551bfb2.js | 1 + assets/js/56acf0ae.efdad338.js | 1 - assets/js/5ae6b2db.805009dd.js | 1 - assets/js/5ae6b2db.b3ee131e.js | 1 + assets/js/5b125e0e.a9b15beb.js | 1 - assets/js/5b125e0e.db87dc27.js | 1 + assets/js/5b1cb890.c9e93232.js | 1 - assets/js/5b1cb890.d67969b6.js | 1 + assets/js/5ee9d842.6d86f079.js | 1 + assets/js/5ee9d842.bad700be.js | 1 - assets/js/5f85402d.5deddab2.js | 1 + assets/js/5f85402d.61c16290.js | 1 - assets/js/6059e070.436f87b2.js | 1 + assets/js/6059e070.b71db1c4.js | 1 - assets/js/6266f1ba.acf0499d.js | 1 + assets/js/6266f1ba.ff81adfd.js | 1 - assets/js/63150b11.021ed6c4.js | 1 + assets/js/63150b11.aa08a8a0.js | 1 - assets/js/651850eb.53ce39ae.js | 1 - assets/js/651850eb.5571c316.js | 1 + assets/js/6608151e.12177c1d.js | 1 - assets/js/6608151e.88d70590.js | 1 + assets/js/68240572.c608be15.js | 1 + assets/js/68240572.de9d1c76.js | 1 - assets/js/68e3f1d5.2027a8ac.js | 1 + assets/js/68e3f1d5.9e4116a4.js | 1 - assets/js/6916680a.0f4d3fd4.js | 1 + assets/js/6916680a.edccce80.js | 1 - assets/js/6a6dcee7.9d746661.js | 1 - assets/js/6a6dcee7.e507f665.js | 1 + assets/js/6d1ddfa7.441abbf0.js | 1 + assets/js/6d1ddfa7.a3040cd8.js | 1 - assets/js/6f809103.5e3ad534.js | 1 - assets/js/6f809103.d7e383cf.js | 1 + assets/js/710ad8a9.34d78b03.js | 1 - assets/js/710ad8a9.abd14729.js | 1 + assets/js/72f058d3.c8a79ab8.js | 1 - assets/js/72f058d3.e4270dfc.js | 1 + assets/js/732c3ce9.e836580a.js | 1 - assets/js/732c3ce9.f3c977f3.js | 1 + assets/js/79ea3e73.78f0a8d8.js | 1 + assets/js/79ea3e73.f4b4a49f.js | 1 - assets/js/7aeeadd4.d3613e4e.js | 1 + assets/js/7aeeadd4.f3efba61.js | 1 - assets/js/80b4c599.80852c2e.js | 1 - assets/js/80b4c599.8162b6e5.js | 1 + assets/js/85e14910.2fc544d7.js | 1 - assets/js/85e14910.f0f47191.js | 1 + assets/js/8665e647.1fb191e2.js | 1 + assets/js/8665e647.5569af9f.js | 1 - assets/js/8afa1348.694cebdf.js | 1 - assets/js/8afa1348.c0503d02.js | 1 + assets/js/8b263414.0a421d1a.js | 1 - assets/js/8b263414.d53970d3.js | 1 + assets/js/9251a350.8819b48c.js | 1 + assets/js/9251a350.d522d74e.js | 1 - assets/js/93f0793d.3e1e1c57.js | 1 - assets/js/93f0793d.90d0beac.js | 1 + assets/js/9798ce17.1e7145ee.js | 1 - assets/js/9798ce17.41c219cf.js | 1 + assets/js/9903dc99.c593e20d.js | 1 - assets/js/9903dc99.fcdb865a.js | 1 + assets/js/9a2fa73a.010c5373.js | 1 - assets/js/9a2fa73a.1374c6eb.js | 1 + assets/js/9bc9e25c.97cb6060.js | 1 + assets/js/9bc9e25c.b0721ee2.js | 1 - assets/js/9d48492b.87887df6.js | 1 + assets/js/9d48492b.88d10686.js | 1 - assets/js/9fc1d339.07b5f688.js | 1 - assets/js/9fc1d339.4062ef27.js | 1 + assets/js/a09c2993.ee37faaf.js | 1 - assets/js/a09c2993.f9c618a4.js | 1 + assets/js/a389e28e.1b6cb54e.js | 1 - assets/js/a389e28e.1b9e5ce3.js | 1 + assets/js/a74b641e.22f75b5f.js | 1 + assets/js/a7d61b99.0fb59d0d.js | 1 - assets/js/a7d61b99.da0ee761.js | 1 + assets/js/a89007e0.156bec11.js | 1 + assets/js/a89007e0.1b9e9303.js | 1 - assets/js/a9789633.72e49576.js | 1 + assets/js/a9789633.b7413b9b.js | 1 - assets/js/aa079c8b.c6c1f4f6.js | 1 - assets/js/aa079c8b.f65c2fcf.js | 1 + assets/js/aad144a3.73471e28.js | 1 - assets/js/aad144a3.7a1f64a5.js | 1 + assets/js/adb64ee2.162a5bbc.js | 1 + assets/js/adb64ee2.e3bee9c5.js | 1 - assets/js/afba4106.765083f1.js | 1 + assets/js/afba4106.f0c6719a.js | 1 - assets/js/b2161dc5.7daa7e46.js | 1 + assets/js/b2161dc5.a7cc08d8.js | 1 - assets/js/b4c5bdfe.4df891a4.js | 1 + assets/js/b4c5bdfe.e7986745.js | 1 - assets/js/b647df5a.3d54e94e.js | 1 + assets/js/b647df5a.7eeaf19d.js | 1 - assets/js/b83f237d.4f231e39.js | 1 + assets/js/b83f237d.6bbb73ab.js | 1 - assets/js/c00c612c.a7e99b58.js | 1 - assets/js/c00c612c.d3122dfe.js | 1 + assets/js/c1bdbc58.76b15c7c.js | 1 + assets/js/c1bdbc58.c96cefa1.js | 1 - assets/js/c44fa306.be4abbc7.js | 1 - assets/js/c44fa306.bec5c683.js | 1 + assets/js/{5635425a.78526312.js => c49413db.ba987b86.js} | 2 +- assets/js/c49413db.f3892545.js | 1 - assets/js/c4ba122c.bd1e08ac.js | 1 + assets/js/c4ba122c.fd0c6607.js | 1 - assets/js/c62dfc48.7fba8c75.js | 1 + assets/js/c62dfc48.d7961d73.js | 1 - assets/js/c7279284.4cb288a7.js | 1 - assets/js/c7279284.578424cf.js | 1 + assets/js/cd9c57cb.10926849.js | 1 - assets/js/cd9c57cb.f9ecb319.js | 1 + assets/js/d069ae84.a1322ed0.js | 1 + assets/js/d069ae84.c58053b0.js | 1 - assets/js/d19b9e8a.8a168629.js | 1 - assets/js/d19b9e8a.d0a3a02f.js | 1 + assets/js/d1b207fe.1e1b9f0a.js | 1 - assets/js/d1b207fe.c680375e.js | 1 + assets/js/d2df711a.0cfa2d64.js | 1 - assets/js/d2df711a.33c3c6bc.js | 1 + assets/js/d4836a8e.73899aa1.js | 1 - assets/js/d4836a8e.9bc41d89.js | 1 + assets/js/d720bb60.acb7534a.js | 1 + assets/js/d720bb60.f7427906.js | 1 - assets/js/d9330f66.11a10b10.js | 1 - assets/js/d9330f66.3cbfd75a.js | 1 + assets/js/daab97c5.89c0e622.js | 1 + assets/js/daab97c5.d8ce26b9.js | 1 - assets/js/dd8b0175.361f477a.js | 1 + assets/js/dd8b0175.42c7befe.js | 1 - assets/js/df70a34a.90948cff.js | 1 + assets/js/df70a34a.95576ce4.js | 1 - assets/js/dff5aaca.8f10ce2c.js | 1 + assets/js/dff5aaca.e45bc03b.js | 1 - assets/js/e0a3f9c8.38c6b821.js | 1 - assets/js/e0a3f9c8.68300784.js | 1 + assets/js/e1715838.42069817.js | 1 + assets/js/e1715838.cb59b6e6.js | 1 - assets/js/ea131d77.49b4638f.js | 1 - assets/js/ea131d77.c37215d5.js | 1 + assets/js/eabdbf07.8654f234.js | 1 - assets/js/eabdbf07.8c48aa10.js | 1 + assets/js/eae657ee.204b4fe1.js | 1 + assets/js/eae657ee.456d4e08.js | 1 - assets/js/ebf39289.6f549ea7.js | 1 - assets/js/ebf39289.7f0994b3.js | 1 + assets/js/ec1d9510.3ce4e8f9.js | 1 - assets/js/ec1d9510.f5ea6a51.js | 1 + assets/js/ecfacc56.1c5df2e2.js | 1 + assets/js/ecfacc56.cd5d0594.js | 1 - assets/js/ef2f3ccd.32a6844d.js | 1 - assets/js/ef2f3ccd.a055ee3a.js | 1 + assets/js/f0447160.6168d2b3.js | 1 - assets/js/f0447160.e2eb878a.js | 1 + assets/js/f14ecac0.5ac8f089.js | 1 + assets/js/f14ecac0.a3f1fced.js | 1 - assets/js/f3212b1e.82b22437.js | 1 - assets/js/f3212b1e.cfbd5c6c.js | 1 + assets/js/f43def45.48782d2a.js | 1 + assets/js/f43def45.e7921309.js | 1 - assets/js/f546eb96.52d3880f.js | 1 - assets/js/f546eb96.913bd1b0.js | 1 + assets/js/f97daad0.849878a2.js | 1 + assets/js/f97daad0.ff34a942.js | 1 - assets/js/fa9f2ace.62902f96.js | 1 + assets/js/fa9f2ace.cd4781f8.js | 1 - assets/js/fc80686b.1751463c.js | 1 - assets/js/fc80686b.5929c04e.js | 1 + assets/js/fea96f18.403a687c.js | 1 + assets/js/fea96f18.97699da5.js | 1 - assets/js/{main.876e95f2.js => main.d5ec95a0.js} | 4 ++-- ...876e95f2.js.LICENSE.txt => main.d5ec95a0.js.LICENSE.txt} | 0 .../{runtime~main.cc107990.js => runtime~main.32f5a81d.js} | 2 +- docs/10.x/getting-started/installation/index.html | 6 +++--- docs/10.x/getting-started/options/index.html | 6 +++--- docs/10.x/getting-started/presets/index.html | 6 +++--- docs/10.x/getting-started/test-environment/index.html | 6 +++--- docs/10.x/guides/absolute-imports/index.html | 6 +++--- docs/10.x/guides/angular-ivy/index.html | 6 +++--- docs/10.x/guides/esm-support/index.html | 6 +++--- docs/10.x/guides/jsdom-version/index.html | 6 +++--- docs/10.x/guides/troubleshooting/index.html | 6 +++--- docs/10.x/guides/using-with-babel/index.html | 6 +++--- docs/10.x/index.html | 6 +++--- docs/10.x/processing/index.html | 6 +++--- docs/11.0/getting-started/installation/index.html | 6 +++--- docs/11.0/getting-started/options/index.html | 6 +++--- docs/11.0/getting-started/presets/index.html | 6 +++--- docs/11.0/getting-started/test-environment/index.html | 6 +++--- docs/11.0/guides/absolute-imports/index.html | 6 +++--- docs/11.0/guides/angular-13+/index.html | 6 +++--- docs/11.0/guides/angular-ivy/index.html | 6 +++--- docs/11.0/guides/esm-support/index.html | 6 +++--- docs/11.0/guides/jsdom-version/index.html | 6 +++--- docs/11.0/guides/troubleshooting/index.html | 6 +++--- docs/11.0/guides/using-with-babel/index.html | 6 +++--- docs/11.0/index.html | 6 +++--- docs/11.0/processing/index.html | 6 +++--- docs/11.1/getting-started/installation/index.html | 6 +++--- docs/11.1/getting-started/options/index.html | 6 +++--- docs/11.1/getting-started/presets/index.html | 6 +++--- docs/11.1/getting-started/test-environment/index.html | 6 +++--- docs/11.1/guides/absolute-imports/index.html | 6 +++--- docs/11.1/guides/angular-13+/index.html | 6 +++--- docs/11.1/guides/angular-ivy/index.html | 6 +++--- docs/11.1/guides/esm-support/index.html | 6 +++--- docs/11.1/guides/jsdom-version/index.html | 6 +++--- docs/11.1/guides/troubleshooting/index.html | 6 +++--- docs/11.1/guides/using-with-babel/index.html | 6 +++--- docs/11.1/index.html | 6 +++--- docs/11.1/processing/index.html | 6 +++--- docs/12.0/getting-started/installation/index.html | 6 +++--- docs/12.0/getting-started/options/index.html | 6 +++--- docs/12.0/getting-started/presets/index.html | 6 +++--- docs/12.0/getting-started/test-environment/index.html | 6 +++--- docs/12.0/guides/absolute-imports/index.html | 6 +++--- docs/12.0/guides/angular-13+/index.html | 6 +++--- docs/12.0/guides/angular-ivy/index.html | 6 +++--- docs/12.0/guides/esm-support/index.html | 6 +++--- docs/12.0/guides/jsdom-version/index.html | 6 +++--- docs/12.0/guides/troubleshooting/index.html | 6 +++--- docs/12.0/guides/using-with-babel/index.html | 6 +++--- docs/12.0/index.html | 6 +++--- docs/12.0/processing/index.html | 6 +++--- docs/13.0/getting-started/installation/index.html | 6 +++--- docs/13.0/getting-started/options/index.html | 6 +++--- docs/13.0/getting-started/presets/index.html | 6 +++--- docs/13.0/getting-started/test-environment/index.html | 6 +++--- docs/13.0/guides/absolute-imports/index.html | 6 +++--- docs/13.0/guides/angular-13+/index.html | 6 +++--- docs/13.0/guides/angular-ivy/index.html | 6 +++--- docs/13.0/guides/esm-support/index.html | 6 +++--- docs/13.0/guides/jsdom-version/index.html | 6 +++--- docs/13.0/guides/troubleshooting/index.html | 6 +++--- docs/13.0/guides/using-with-babel/index.html | 6 +++--- docs/13.0/index.html | 6 +++--- docs/13.0/processing/index.html | 6 +++--- docs/14.0/getting-started/installation/index.html | 6 +++--- docs/14.0/getting-started/options/index.html | 6 +++--- docs/14.0/getting-started/presets/index.html | 6 +++--- docs/14.0/getting-started/test-environment/index.html | 6 +++--- docs/14.0/guides/absolute-imports/index.html | 6 +++--- docs/14.0/guides/angular-13+/index.html | 6 +++--- docs/14.0/guides/angular-ivy/index.html | 6 +++--- docs/14.0/guides/esm-support/index.html | 6 +++--- docs/14.0/guides/jsdom-version/index.html | 6 +++--- docs/14.0/guides/troubleshooting/index.html | 6 +++--- docs/14.0/guides/using-with-babel/index.html | 6 +++--- docs/14.0/index.html | 6 +++--- docs/14.0/processing/index.html | 6 +++--- docs/8.x/getting-started/installation/index.html | 6 +++--- docs/8.x/getting-started/options/index.html | 6 +++--- docs/8.x/getting-started/presets/index.html | 6 +++--- docs/8.x/getting-started/test-environment/index.html | 6 +++--- docs/8.x/guides/absolute-imports/index.html | 6 +++--- docs/8.x/guides/angular-ivy/index.html | 6 +++--- docs/8.x/guides/esm-support/index.html | 6 +++--- docs/8.x/guides/jsdom-version/index.html | 6 +++--- docs/8.x/guides/troubleshooting/index.html | 6 +++--- docs/8.x/guides/using-with-babel/index.html | 6 +++--- docs/8.x/index.html | 6 +++--- docs/8.x/processing/index.html | 6 +++--- docs/9.x/getting-started/installation/index.html | 6 +++--- docs/9.x/getting-started/options/index.html | 6 +++--- docs/9.x/getting-started/presets/index.html | 6 +++--- docs/9.x/getting-started/test-environment/index.html | 6 +++--- docs/9.x/guides/absolute-imports/index.html | 6 +++--- docs/9.x/guides/angular-ivy/index.html | 6 +++--- docs/9.x/guides/esm-support/index.html | 6 +++--- docs/9.x/guides/jsdom-version/index.html | 6 +++--- docs/9.x/guides/troubleshooting/index.html | 6 +++--- docs/9.x/guides/using-with-babel/index.html | 6 +++--- docs/9.x/index.html | 6 +++--- docs/9.x/processing/index.html | 6 +++--- docs/getting-started/installation/index.html | 6 +++--- docs/getting-started/options/index.html | 6 +++--- docs/getting-started/presets/index.html | 6 +++--- docs/getting-started/test-environment/index.html | 6 +++--- docs/guides/absolute-imports/index.html | 6 +++--- docs/guides/angular-13+/index.html | 6 +++--- docs/guides/angular-ivy/index.html | 6 +++--- docs/guides/esm-support/index.html | 6 +++--- docs/guides/jsdom-version/index.html | 6 +++--- docs/guides/snapshot-testing/index.html | 6 +++--- docs/guides/troubleshooting/index.html | 6 +++--- docs/guides/using-with-babel/index.html | 6 +++--- docs/index.html | 6 +++--- docs/next/getting-started/installation/index.html | 6 +++--- docs/next/getting-started/options/index.html | 6 +++--- docs/next/getting-started/presets/index.html | 6 +++--- docs/next/getting-started/test-environment/index.html | 6 +++--- docs/next/guides/absolute-imports/index.html | 6 +++--- docs/next/guides/angular-13+/index.html | 6 +++--- docs/next/guides/angular-ivy/index.html | 6 +++--- docs/next/guides/esm-support/index.html | 6 +++--- docs/next/guides/jsdom-version/index.html | 6 +++--- docs/next/guides/snapshot-testing/index.html | 6 +++--- docs/next/guides/troubleshooting/index.html | 6 +++--- docs/next/guides/using-with-babel/index.html | 6 +++--- docs/next/index.html | 6 +++--- docs/next/processing/index.html | 6 +++--- docs/processing/index.html | 6 +++--- index.html | 4 ++-- search/index.html | 4 ++-- sw.js | 2 +- versions/index.html | 4 ++-- 392 files changed, 528 insertions(+), 528 deletions(-) create mode 100644 assets/js/029bedf1.573997ce.js delete mode 100644 assets/js/029bedf1.73a02698.js delete mode 100644 assets/js/02a1e558.5e4485e9.js create mode 100644 assets/js/02a1e558.867dfe89.js delete mode 100644 assets/js/03be7dae.76728443.js create mode 100644 assets/js/03be7dae.c96e9fd0.js create mode 100644 assets/js/04ae74d1.81158c40.js delete mode 100644 assets/js/04ae74d1.f95b5ea8.js create mode 100644 assets/js/04b3fc6c.0ab9f51b.js delete mode 100644 assets/js/04b3fc6c.c41ba507.js delete mode 100644 assets/js/05916282.433934f3.js rename assets/js/{a74b641e.58d36fc6.js => 05916282.5aebc1a7.js} (53%) delete mode 100644 assets/js/0d71a3f1.2592d896.js create mode 100644 assets/js/0d71a3f1.a7b070ca.js create mode 100644 assets/js/0dc350cc.9806f372.js delete mode 100644 assets/js/0dc350cc.a1bac570.js delete mode 100644 assets/js/0e35f71d.763548fa.js create mode 100644 assets/js/0e35f71d.eaeb1631.js create mode 100644 assets/js/13973f06.5c8d6bac.js delete mode 100644 assets/js/13973f06.e0fb231f.js delete mode 100644 assets/js/1438ea8f.20cef9a9.js create mode 100644 assets/js/1438ea8f.32651baa.js delete mode 100644 assets/js/14b133ce.6d5e977a.js create mode 100644 assets/js/14b133ce.76fc65a0.js delete mode 100644 assets/js/151633a5.6d6538de.js create mode 100644 assets/js/151633a5.7a966d53.js create mode 100644 assets/js/1a421168.5d3e194a.js delete mode 100644 assets/js/1a421168.c4b0cdcb.js create mode 100644 assets/js/1a5572f6.4a787f14.js delete mode 100644 assets/js/1a5572f6.9408d555.js create mode 100644 assets/js/1e388ac9.855a1c14.js delete mode 100644 assets/js/1e388ac9.bead1dde.js delete mode 100644 assets/js/203fc93e.7e67e571.js create mode 100644 assets/js/203fc93e.dd915af4.js delete mode 100644 assets/js/22e4d634.2a53ad07.js create mode 100644 assets/js/22e4d634.64ab8474.js delete mode 100644 assets/js/252e2b80.83874241.js create mode 100644 assets/js/252e2b80.d5c6b54b.js create mode 100644 assets/js/26cb42b7.64a67a02.js delete mode 100644 assets/js/26cb42b7.f6f3005c.js create mode 100644 assets/js/27299a3b.f8d54705.js create mode 100644 assets/js/29d26392.3957b905.js delete mode 100644 assets/js/29d26392.e3d1d3e7.js delete mode 100644 assets/js/2ab18ce5.1153a5bf.js create mode 100644 assets/js/2ab18ce5.c4f26df5.js delete mode 100644 assets/js/2ae17008.b7340f55.js create mode 100644 assets/js/2ae17008.d1e5b0ff.js create mode 100644 assets/js/2e81e74f.37678685.js delete mode 100644 assets/js/2e81e74f.6f50883c.js delete mode 100644 assets/js/30388853.0ed0efd9.js create mode 100644 assets/js/30388853.7a1b4582.js create mode 100644 assets/js/33a5adb4.997a0fe6.js delete mode 100644 assets/js/33a5adb4.fc17da8d.js delete mode 100644 assets/js/388d3430.1a49bf41.js create mode 100644 assets/js/388d3430.a5652915.js create mode 100644 assets/js/3c7caf67.22585c49.js delete mode 100644 assets/js/3c7caf67.84b19da3.js delete mode 100644 assets/js/407f8801.3567c935.js create mode 100644 assets/js/407f8801.c52003df.js create mode 100644 assets/js/433cefd8.1863f4db.js delete mode 100644 assets/js/433cefd8.eeea9e06.js create mode 100644 assets/js/4351d34b.148b189a.js delete mode 100644 assets/js/4351d34b.9b3f87b7.js delete mode 100644 assets/js/44b4d73b.38153ec4.js create mode 100644 assets/js/44b4d73b.f4d6c60f.js delete mode 100644 assets/js/47c825a2.63eee6aa.js create mode 100644 assets/js/47c825a2.8349d0ad.js create mode 100644 assets/js/47cccd8d.8ceb3e64.js delete mode 100644 assets/js/47cccd8d.e5222f6d.js create mode 100644 assets/js/48dd39e2.ca15f0fc.js delete mode 100644 assets/js/48dd39e2.ca6c5fb6.js create mode 100644 assets/js/494f4f5e.059a4ef6.js delete mode 100644 assets/js/494f4f5e.085604ce.js create mode 100644 assets/js/4b3f866b.32e0394d.js delete mode 100644 assets/js/4b3f866b.4470b289.js create mode 100644 assets/js/4e0c07c5.034f77e0.js delete mode 100644 assets/js/4e0c07c5.78821343.js delete mode 100644 assets/js/51d67042.010d5956.js create mode 100644 assets/js/51d67042.62598e74.js create mode 100644 assets/js/54071611.a9efa22a.js delete mode 100644 assets/js/54071611.dd2d0bd2.js rename assets/js/{27299a3b.4ce4434e.js => 54f44165.4c15eecd.js} (64%) delete mode 100644 assets/js/54f44165.61369b7f.js create mode 100644 assets/js/5635425a.afdf10b3.js create mode 100644 assets/js/56acf0ae.e551bfb2.js delete mode 100644 assets/js/56acf0ae.efdad338.js delete mode 100644 assets/js/5ae6b2db.805009dd.js create mode 100644 assets/js/5ae6b2db.b3ee131e.js delete mode 100644 assets/js/5b125e0e.a9b15beb.js create mode 100644 assets/js/5b125e0e.db87dc27.js delete mode 100644 assets/js/5b1cb890.c9e93232.js create mode 100644 assets/js/5b1cb890.d67969b6.js create mode 100644 assets/js/5ee9d842.6d86f079.js delete mode 100644 assets/js/5ee9d842.bad700be.js create mode 100644 assets/js/5f85402d.5deddab2.js delete mode 100644 assets/js/5f85402d.61c16290.js create mode 100644 assets/js/6059e070.436f87b2.js delete mode 100644 assets/js/6059e070.b71db1c4.js create mode 100644 assets/js/6266f1ba.acf0499d.js delete mode 100644 assets/js/6266f1ba.ff81adfd.js create mode 100644 assets/js/63150b11.021ed6c4.js delete mode 100644 assets/js/63150b11.aa08a8a0.js delete mode 100644 assets/js/651850eb.53ce39ae.js create mode 100644 assets/js/651850eb.5571c316.js delete mode 100644 assets/js/6608151e.12177c1d.js create mode 100644 assets/js/6608151e.88d70590.js create mode 100644 assets/js/68240572.c608be15.js delete mode 100644 assets/js/68240572.de9d1c76.js create mode 100644 assets/js/68e3f1d5.2027a8ac.js delete mode 100644 assets/js/68e3f1d5.9e4116a4.js create mode 100644 assets/js/6916680a.0f4d3fd4.js delete mode 100644 assets/js/6916680a.edccce80.js delete mode 100644 assets/js/6a6dcee7.9d746661.js create mode 100644 assets/js/6a6dcee7.e507f665.js create mode 100644 assets/js/6d1ddfa7.441abbf0.js delete mode 100644 assets/js/6d1ddfa7.a3040cd8.js delete mode 100644 assets/js/6f809103.5e3ad534.js create mode 100644 assets/js/6f809103.d7e383cf.js delete mode 100644 assets/js/710ad8a9.34d78b03.js create mode 100644 assets/js/710ad8a9.abd14729.js delete mode 100644 assets/js/72f058d3.c8a79ab8.js create mode 100644 assets/js/72f058d3.e4270dfc.js delete mode 100644 assets/js/732c3ce9.e836580a.js create mode 100644 assets/js/732c3ce9.f3c977f3.js create mode 100644 assets/js/79ea3e73.78f0a8d8.js delete mode 100644 assets/js/79ea3e73.f4b4a49f.js create mode 100644 assets/js/7aeeadd4.d3613e4e.js delete mode 100644 assets/js/7aeeadd4.f3efba61.js delete mode 100644 assets/js/80b4c599.80852c2e.js create mode 100644 assets/js/80b4c599.8162b6e5.js delete mode 100644 assets/js/85e14910.2fc544d7.js create mode 100644 assets/js/85e14910.f0f47191.js create mode 100644 assets/js/8665e647.1fb191e2.js delete mode 100644 assets/js/8665e647.5569af9f.js delete mode 100644 assets/js/8afa1348.694cebdf.js create mode 100644 assets/js/8afa1348.c0503d02.js delete mode 100644 assets/js/8b263414.0a421d1a.js create mode 100644 assets/js/8b263414.d53970d3.js create mode 100644 assets/js/9251a350.8819b48c.js delete mode 100644 assets/js/9251a350.d522d74e.js delete mode 100644 assets/js/93f0793d.3e1e1c57.js create mode 100644 assets/js/93f0793d.90d0beac.js delete mode 100644 assets/js/9798ce17.1e7145ee.js create mode 100644 assets/js/9798ce17.41c219cf.js delete mode 100644 assets/js/9903dc99.c593e20d.js create mode 100644 assets/js/9903dc99.fcdb865a.js delete mode 100644 assets/js/9a2fa73a.010c5373.js create mode 100644 assets/js/9a2fa73a.1374c6eb.js create mode 100644 assets/js/9bc9e25c.97cb6060.js delete mode 100644 assets/js/9bc9e25c.b0721ee2.js create mode 100644 assets/js/9d48492b.87887df6.js delete mode 100644 assets/js/9d48492b.88d10686.js delete mode 100644 assets/js/9fc1d339.07b5f688.js create mode 100644 assets/js/9fc1d339.4062ef27.js delete mode 100644 assets/js/a09c2993.ee37faaf.js create mode 100644 assets/js/a09c2993.f9c618a4.js delete mode 100644 assets/js/a389e28e.1b6cb54e.js create mode 100644 assets/js/a389e28e.1b9e5ce3.js create mode 100644 assets/js/a74b641e.22f75b5f.js delete mode 100644 assets/js/a7d61b99.0fb59d0d.js create mode 100644 assets/js/a7d61b99.da0ee761.js create mode 100644 assets/js/a89007e0.156bec11.js delete mode 100644 assets/js/a89007e0.1b9e9303.js create mode 100644 assets/js/a9789633.72e49576.js delete mode 100644 assets/js/a9789633.b7413b9b.js delete mode 100644 assets/js/aa079c8b.c6c1f4f6.js create mode 100644 assets/js/aa079c8b.f65c2fcf.js delete mode 100644 assets/js/aad144a3.73471e28.js create mode 100644 assets/js/aad144a3.7a1f64a5.js create mode 100644 assets/js/adb64ee2.162a5bbc.js delete mode 100644 assets/js/adb64ee2.e3bee9c5.js create mode 100644 assets/js/afba4106.765083f1.js delete mode 100644 assets/js/afba4106.f0c6719a.js create mode 100644 assets/js/b2161dc5.7daa7e46.js delete mode 100644 assets/js/b2161dc5.a7cc08d8.js create mode 100644 assets/js/b4c5bdfe.4df891a4.js delete mode 100644 assets/js/b4c5bdfe.e7986745.js create mode 100644 assets/js/b647df5a.3d54e94e.js delete mode 100644 assets/js/b647df5a.7eeaf19d.js create mode 100644 assets/js/b83f237d.4f231e39.js delete mode 100644 assets/js/b83f237d.6bbb73ab.js delete mode 100644 assets/js/c00c612c.a7e99b58.js create mode 100644 assets/js/c00c612c.d3122dfe.js create mode 100644 assets/js/c1bdbc58.76b15c7c.js delete mode 100644 assets/js/c1bdbc58.c96cefa1.js delete mode 100644 assets/js/c44fa306.be4abbc7.js create mode 100644 assets/js/c44fa306.bec5c683.js rename assets/js/{5635425a.78526312.js => c49413db.ba987b86.js} (57%) delete mode 100644 assets/js/c49413db.f3892545.js create mode 100644 assets/js/c4ba122c.bd1e08ac.js delete mode 100644 assets/js/c4ba122c.fd0c6607.js create mode 100644 assets/js/c62dfc48.7fba8c75.js delete mode 100644 assets/js/c62dfc48.d7961d73.js delete mode 100644 assets/js/c7279284.4cb288a7.js create mode 100644 assets/js/c7279284.578424cf.js delete mode 100644 assets/js/cd9c57cb.10926849.js create mode 100644 assets/js/cd9c57cb.f9ecb319.js create mode 100644 assets/js/d069ae84.a1322ed0.js delete mode 100644 assets/js/d069ae84.c58053b0.js delete mode 100644 assets/js/d19b9e8a.8a168629.js create mode 100644 assets/js/d19b9e8a.d0a3a02f.js delete mode 100644 assets/js/d1b207fe.1e1b9f0a.js create mode 100644 assets/js/d1b207fe.c680375e.js delete mode 100644 assets/js/d2df711a.0cfa2d64.js create mode 100644 assets/js/d2df711a.33c3c6bc.js delete mode 100644 assets/js/d4836a8e.73899aa1.js create mode 100644 assets/js/d4836a8e.9bc41d89.js create mode 100644 assets/js/d720bb60.acb7534a.js delete mode 100644 assets/js/d720bb60.f7427906.js delete mode 100644 assets/js/d9330f66.11a10b10.js create mode 100644 assets/js/d9330f66.3cbfd75a.js create mode 100644 assets/js/daab97c5.89c0e622.js delete mode 100644 assets/js/daab97c5.d8ce26b9.js create mode 100644 assets/js/dd8b0175.361f477a.js delete mode 100644 assets/js/dd8b0175.42c7befe.js create mode 100644 assets/js/df70a34a.90948cff.js delete mode 100644 assets/js/df70a34a.95576ce4.js create mode 100644 assets/js/dff5aaca.8f10ce2c.js delete mode 100644 assets/js/dff5aaca.e45bc03b.js delete mode 100644 assets/js/e0a3f9c8.38c6b821.js create mode 100644 assets/js/e0a3f9c8.68300784.js create mode 100644 assets/js/e1715838.42069817.js delete mode 100644 assets/js/e1715838.cb59b6e6.js delete mode 100644 assets/js/ea131d77.49b4638f.js create mode 100644 assets/js/ea131d77.c37215d5.js delete mode 100644 assets/js/eabdbf07.8654f234.js create mode 100644 assets/js/eabdbf07.8c48aa10.js create mode 100644 assets/js/eae657ee.204b4fe1.js delete mode 100644 assets/js/eae657ee.456d4e08.js delete mode 100644 assets/js/ebf39289.6f549ea7.js create mode 100644 assets/js/ebf39289.7f0994b3.js delete mode 100644 assets/js/ec1d9510.3ce4e8f9.js create mode 100644 assets/js/ec1d9510.f5ea6a51.js create mode 100644 assets/js/ecfacc56.1c5df2e2.js delete mode 100644 assets/js/ecfacc56.cd5d0594.js delete mode 100644 assets/js/ef2f3ccd.32a6844d.js create mode 100644 assets/js/ef2f3ccd.a055ee3a.js delete mode 100644 assets/js/f0447160.6168d2b3.js create mode 100644 assets/js/f0447160.e2eb878a.js create mode 100644 assets/js/f14ecac0.5ac8f089.js delete mode 100644 assets/js/f14ecac0.a3f1fced.js delete mode 100644 assets/js/f3212b1e.82b22437.js create mode 100644 assets/js/f3212b1e.cfbd5c6c.js create mode 100644 assets/js/f43def45.48782d2a.js delete mode 100644 assets/js/f43def45.e7921309.js delete mode 100644 assets/js/f546eb96.52d3880f.js create mode 100644 assets/js/f546eb96.913bd1b0.js create mode 100644 assets/js/f97daad0.849878a2.js delete mode 100644 assets/js/f97daad0.ff34a942.js create mode 100644 assets/js/fa9f2ace.62902f96.js delete mode 100644 assets/js/fa9f2ace.cd4781f8.js delete mode 100644 assets/js/fc80686b.1751463c.js create mode 100644 assets/js/fc80686b.5929c04e.js create mode 100644 assets/js/fea96f18.403a687c.js delete mode 100644 assets/js/fea96f18.97699da5.js rename assets/js/{main.876e95f2.js => main.d5ec95a0.js} (95%) rename assets/js/{main.876e95f2.js.LICENSE.txt => main.d5ec95a0.js.LICENSE.txt} (100%) rename assets/js/{runtime~main.cc107990.js => runtime~main.32f5a81d.js} (60%) diff --git a/404.html b/404.html index 73e63263e7..0a0fd03ca6 100644 --- a/404.html +++ b/404.html @@ -14,8 +14,8 @@ - - + +
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
ChangeDetectionStrategy.OnPush
is used",id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",level:3},{value:"The animation trigger "transformMenu" has failed",id:"the-animation-trigger-transformmenu-has-failed",level:3},{value:"Unexpected token [import|export|other]",id:"unexpected-token-importexportother",level:3},{value:"Allow vendor libraries like jQuery, etc...",id:"allow-vendor-libraries-like-jquery-etc",level:3},{value:"Coverage fail but tests pass",id:"coverage-fail-but-tests-pass",level:3},{value:"Resolver needed for some javascript library or nested dependencies",id:"resolver-needed-for-some-javascript-library-or-nested-dependencies",level:3},{value:"Javascript library",id:"javascript-library",level:4},{value:"Nested dependency (node_modules
package within another package node_nodules
)",id:"nested-dependency-node_modules-package-within-another-package-node_nodules",level:4},{value:"Resolution",id:"resolution",level:4},{value:"Inject dependencies with TypeScript interface or exported namespace",id:"inject-dependencies-with-typescript-interface-or-exported-namespace",level:3}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["You can check Jest ",(0,r.jsx)(n.a,{href:"https://jestjs.io/docs/en/troubleshooting",children:"troubleshooting guide"})]}),"\n",(0,r.jsx)(n.h2,{id:"common-issues",children:"Common issues"}),"\n",(0,r.jsxs)(n.p,{children:["Problems may arise if you're using custom builds (this preset is tailored for ",(0,r.jsx)(n.code,{children:"angular-cli"})," as firstly priority). Please be advised that every entry in default configuration may be overridden to best suite your app's needs."]}),"\n",(0,r.jsx)(n.h3,{id:"cant-resolve-all-parameters-for-someclass",children:"Can't resolve all parameters for SomeClass(?)"}),"\n",(0,r.jsxs)(n.p,{children:["With Angular 8 and higher, a ",(0,r.jsx)(n.a,{href:"https://github.com/thymikee/jest-preset-angular/issues/288",children:"change to the way the Angular CLI works"})," may be causing your metadata to be lost. You can update your ",(0,r.jsx)(n.code,{children:"tsconfig.spec.json"})," to include the ",(0,r.jsx)(n.code,{children:"emitDecoratorMetadata"})," compiler option:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:' "compilerOptions": {\n "emitDecoratorMetadata": true\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In general, this is related to Angular's reflection and also depends on a reflection library, as e. g. included in ",(0,r.jsx)(n.code,{children:"core-js"}),". We use our own minimal reflection that satisfy Angular's current requirements, but in case these change, you can install ",(0,r.jsx)(n.code,{children:"core-js"})," and import the reflection library in your ",(0,r.jsx)(n.code,{children:"setup-jest.ts"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// setup-jest.ts\nrequire('core-js/es/reflect');\nrequire('core-js/proposals/reflect-metadata');\n"})}),"\n",(0,r.jsx)(n.p,{children:"Note that this might also be related to other issues with the dependency injection and parameter type reflection."}),"\n",(0,r.jsxs)(n.h3,{id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",children:["@Input() bindings are not reflected into fixture when ",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.OnPush"})," is used"]}),"\n",(0,r.jsxs)(n.p,{children:["This issue is not related to Jest, ",(0,r.jsx)(n.a,{href:"https://github.com/angular/angular/issues/12313",children:"it's a known Angular bug"})]}),"\n",(0,r.jsxs)(n.p,{children:["To mitigate this, you need to wrap your component under test, into some container component with default change detection strategy (",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.Default"}),") and pass props through it, or overwrite change detection strategy within ",(0,r.jsx)(n.code,{children:"TestBed"})," setup, if it's not critical for the test."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// override change detection strategy\nbeforeEach(async(() => {\n TestBed.configureTestingModule({ declarations: [PizzaItemComponent] })\n .overrideComponent(PizzaItemComponent, {\n set: { changeDetection: ChangeDetectionStrategy.Default },\n })\n .compileComponents();\n}));\n"})}),"\n",(0,r.jsx)(n.h3,{id:"the-animation-trigger-transformmenu-has-failed",children:'The animation trigger "transformMenu" has failed'}),"\n",(0,r.jsx)(n.p,{children:"The currently used JSDOM version handles this, but older versions used before v7 of this preset was missing transform property. To patch it for Angular Material, use this workaround."}),"\n",(0,r.jsxs)(n.p,{children:["Add this to your ",(0,r.jsx)(n.code,{children:"jestGlobalMocks"})," file"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// jestGlobalMocks.ts\nObject.defineProperty(document.body.style, 'transform', {\n value: () => {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n});\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Reference: ",(0,r.jsx)(n.a,{href:"https://github.com/angular/material2/issues/7101",children:"https://github.com/angular/material2/issues/7101"})]}),"\n",(0,r.jsx)(n.h3,{id:"unexpected-token-importexportother",children:"Unexpected token [import|export|other]"}),"\n",(0,r.jsxs)(n.p,{children:["This means, that a file is not transformed through ",(0,r.jsx)(n.code,{children:"TypeScript"})," compiler, e.g. because it is a ",(0,r.jsx)(n.code,{children:"JS"})," file with ",(0,r.jsx)(n.code,{children:"TS"})," syntax, or\nit is published to npm as uncompiled source files. Here's what you can do. A typical Jest error is like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"({\"Object.ChangeDetectionStrategy.OnPush
is used",id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",level:3},{value:"The animation trigger "transformMenu" has failed",id:"the-animation-trigger-transformmenu-has-failed",level:3},{value:"Unexpected token [import|export|other]",id:"unexpected-token-importexportother",level:3},{value:"Allow vendor libraries like jQuery, etc...",id:"allow-vendor-libraries-like-jquery-etc",level:3},{value:"Coverage fail but tests pass",id:"coverage-fail-but-tests-pass",level:3},{value:"Resolver needed for some javascript library or nested dependencies",id:"resolver-needed-for-some-javascript-library-or-nested-dependencies",level:3},{value:"Javascript library",id:"javascript-library",level:4},{value:"Nested dependency (node_modules
package within another package node_nodules
)",id:"nested-dependency-node_modules-package-within-another-package-node_nodules",level:4},{value:"Resolution",id:"resolution",level:4},{value:"Inject dependencies with TypeScript interface or exported namespace",id:"inject-dependencies-with-typescript-interface-or-exported-namespace",level:3}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["You can check Jest ",(0,r.jsx)(n.a,{href:"https://jestjs.io/docs/en/troubleshooting",children:"troubleshooting guide"})]}),"\n",(0,r.jsx)(n.h2,{id:"common-issues",children:"Common issues"}),"\n",(0,r.jsxs)(n.p,{children:["Problems may arise if you're using custom builds (this preset is tailored for ",(0,r.jsx)(n.code,{children:"angular-cli"})," as firstly priority). Please be advised that every entry in default configuration may be overridden to best suite your app's needs."]}),"\n",(0,r.jsx)(n.h3,{id:"cant-resolve-all-parameters-for-someclass",children:"Can't resolve all parameters for SomeClass(?)"}),"\n",(0,r.jsxs)(n.p,{children:["With Angular 8 and higher, a ",(0,r.jsx)(n.a,{href:"https://github.com/thymikee/jest-preset-angular/issues/288",children:"change to the way the Angular CLI works"})," may be causing your metadata to be lost. You can update your ",(0,r.jsx)(n.code,{children:"tsconfig.spec.json"})," to include the ",(0,r.jsx)(n.code,{children:"emitDecoratorMetadata"})," compiler option:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:' "compilerOptions": {\n "emitDecoratorMetadata": true\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In general, this is related to Angular's reflection and also depends on a reflection library, as e. g. included in ",(0,r.jsx)(n.code,{children:"core-js"}),". We use our own minimal reflection that satisfy Angular's current requirements, but in case these change, you can install ",(0,r.jsx)(n.code,{children:"core-js"})," and import the reflection library in your ",(0,r.jsx)(n.code,{children:"setup-jest.ts"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// setup-jest.ts\nrequire('core-js/es/reflect');\nrequire('core-js/proposals/reflect-metadata');\n"})}),"\n",(0,r.jsx)(n.p,{children:"Note that this might also be related to other issues with the dependency injection and parameter type reflection."}),"\n",(0,r.jsxs)(n.h3,{id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",children:["@Input() bindings are not reflected into fixture when ",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.OnPush"})," is used"]}),"\n",(0,r.jsxs)(n.p,{children:["This issue is not related to Jest, ",(0,r.jsx)(n.a,{href:"https://github.com/angular/angular/issues/12313",children:"it's a known Angular bug"})]}),"\n",(0,r.jsxs)(n.p,{children:["To mitigate this, you need to wrap your component under test, into some container component with default change detection strategy (",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.Default"}),") and pass props through it, or overwrite change detection strategy within ",(0,r.jsx)(n.code,{children:"TestBed"})," setup, if it's not critical for the test."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// override change detection strategy\nbeforeEach(async(() => {\n TestBed.configureTestingModule({ declarations: [PizzaItemComponent] })\n .overrideComponent(PizzaItemComponent, {\n set: { changeDetection: ChangeDetectionStrategy.Default },\n })\n .compileComponents();\n}));\n"})}),"\n",(0,r.jsx)(n.h3,{id:"the-animation-trigger-transformmenu-has-failed",children:'The animation trigger "transformMenu" has failed'}),"\n",(0,r.jsx)(n.p,{children:"The currently used JSDOM version handles this, but older versions used before v7 of this preset was missing transform property. To patch it for Angular Material, use this workaround."}),"\n",(0,r.jsxs)(n.p,{children:["Add this to your ",(0,r.jsx)(n.code,{children:"jestGlobalMocks"})," file"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// jestGlobalMocks.ts\nObject.defineProperty(document.body.style, 'transform', {\n value: () => {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n});\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Reference: ",(0,r.jsx)(n.a,{href:"https://github.com/angular/material2/issues/7101",children:"https://github.com/angular/material2/issues/7101"})]}),"\n",(0,r.jsx)(n.h3,{id:"unexpected-token-importexportother",children:"Unexpected token [import|export|other]"}),"\n",(0,r.jsxs)(n.p,{children:["This means, that a file is not transformed through ",(0,r.jsx)(n.code,{children:"TypeScript"})," compiler, e.g. because it is a ",(0,r.jsx)(n.code,{children:"JS"})," file with ",(0,r.jsx)(n.code,{children:"TS"})," syntax, or\nit is published to npm as uncompiled source files. Here's what you can do. A typical Jest error is like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"({\"Object.ChangeDetectionStrategy.OnPush
is used",id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",level:3},{value:"The animation trigger "transformMenu" has failed",id:"the-animation-trigger-transformmenu-has-failed",level:3},{value:"Unexpected token [import|export|other]",id:"unexpected-token-importexportother",level:3},{value:"Allow vendor libraries like jQuery, etc...",id:"allow-vendor-libraries-like-jquery-etc",level:3},{value:"Coverage fail but tests pass",id:"coverage-fail-but-tests-pass",level:3},{value:"Resolver needed for some javascript library or nested dependencies",id:"resolver-needed-for-some-javascript-library-or-nested-dependencies",level:3},{value:"Javascript library",id:"javascript-library",level:4},{value:"Nested dependency (node_modules
package within another package node_nodules
)",id:"nested-dependency-node_modules-package-within-another-package-node_nodules",level:4},{value:"Resolution",id:"resolution",level:4}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["You can check Jest ",(0,r.jsx)(n.a,{href:"https://jestjs.io/docs/en/troubleshooting",children:"troubleshooting guide"})]}),"\n",(0,r.jsx)(n.h2,{id:"common-issues",children:"Common issues"}),"\n",(0,r.jsxs)(n.p,{children:["Problems may arise if you're using custom builds (this preset is tailored for ",(0,r.jsx)(n.code,{children:"angular-cli"})," as firstly priority). Please be advised that every entry in default configuration may be overridden to best suite your app's needs."]}),"\n",(0,r.jsx)(n.h3,{id:"cant-resolve-all-parameters-for-someclass",children:"Can't resolve all parameters for SomeClass(?)"}),"\n",(0,r.jsxs)(n.p,{children:["With Angular 8 and higher, a ",(0,r.jsx)(n.a,{href:"https://github.com/thymikee/jest-preset-angular/issues/288",children:"change to the way the Angular CLI works"})," may be causing your metadata to be lost. You can update your ",(0,r.jsx)(n.code,{children:"tsconfig.spec.json"})," to include the ",(0,r.jsx)(n.code,{children:"emitDecoratorMetadata"})," compiler option:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:' "compilerOptions": {\n "emitDecoratorMetadata": true\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In general, this is related to Angular's reflection and also depends on a reflection library, as e. g. included in ",(0,r.jsx)(n.code,{children:"core-js"}),". We use our own minimal reflection that satisfy Angular's current requirements, but in case these change, you can install ",(0,r.jsx)(n.code,{children:"core-js"})," and import the reflection library in your ",(0,r.jsx)(n.code,{children:"setup-jest.ts"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"require('core-js/es/reflect');\nrequire('core-js/proposals/reflect-metadata');\n"})}),"\n",(0,r.jsx)(n.p,{children:"Note that this might also be related to other issues with the dependency injection and parameter type reflection."}),"\n",(0,r.jsxs)(n.h3,{id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",children:["@Input() bindings are not reflected into fixture when ",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.OnPush"})," is used"]}),"\n",(0,r.jsxs)(n.p,{children:["This issue is not related to Jest, ",(0,r.jsx)(n.a,{href:"https://github.com/angular/angular/issues/12313",children:"it's a known Angular bug"})]}),"\n",(0,r.jsxs)(n.p,{children:["To mitigate this, you need to wrap your component under test, into some container component with default change detection strategy (",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.Default"}),") and pass props through it, or overwrite change detection strategy within ",(0,r.jsx)(n.code,{children:"TestBed"})," setup, if it's not critical for the test."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// override change detection strategy\nbeforeEach(async(() => {\n TestBed.configureTestingModule({ declarations: [PizzaItemComponent] })\n .overrideComponent(PizzaItemComponent, {\n set: { changeDetection: ChangeDetectionStrategy.Default },\n })\n .compileComponents();\n}));\n"})}),"\n",(0,r.jsx)(n.h3,{id:"the-animation-trigger-transformmenu-has-failed",children:'The animation trigger "transformMenu" has failed'}),"\n",(0,r.jsx)(n.p,{children:"The currently used JSDOM version handles this, but older versions used before v7 of this preset was missing transform property. To patch it for Angular Material, use this workaround."}),"\n",(0,r.jsxs)(n.p,{children:["Add this to your ",(0,r.jsx)(n.code,{children:"jestGlobalMocks"})," file"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:"Object.defineProperty(document.body.style, 'transform', {\n value: () => {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n});\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Reference: ",(0,r.jsx)(n.a,{href:"https://github.com/angular/material2/issues/7101",children:"https://github.com/angular/material2/issues/7101"})]}),"\n",(0,r.jsx)(n.h3,{id:"unexpected-token-importexportother",children:"Unexpected token [import|export|other]"}),"\n",(0,r.jsxs)(n.p,{children:["This means, that a file is not transformed through ",(0,r.jsx)(n.code,{children:"TypeScript"})," compiler, e.g. because it is a ",(0,r.jsx)(n.code,{children:"JS"})," file with ",(0,r.jsx)(n.code,{children:"TS"})," syntax, or\nit is published to npm as uncompiled source files. Here's what you can do. A typical Jest error is like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"({\"Object.ChangeDetectionStrategy.OnPush
is used",id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",level:3},{value:"The animation trigger "transformMenu" has failed",id:"the-animation-trigger-transformmenu-has-failed",level:3},{value:"Unexpected token [import|export|other]",id:"unexpected-token-importexportother",level:3},{value:"Allow vendor libraries like jQuery, etc...",id:"allow-vendor-libraries-like-jquery-etc",level:3},{value:"Coverage fail but tests pass",id:"coverage-fail-but-tests-pass",level:3},{value:"Resolver needed for some javascript library or nested dependencies",id:"resolver-needed-for-some-javascript-library-or-nested-dependencies",level:3},{value:"Javascript library",id:"javascript-library",level:4},{value:"Nested dependency (node_modules
package within another package node_nodules
)",id:"nested-dependency-node_modules-package-within-another-package-node_nodules",level:4},{value:"Resolution",id:"resolution",level:4}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["You can check Jest ",(0,r.jsx)(n.a,{href:"https://jestjs.io/docs/en/troubleshooting",children:"troubleshooting guide"})]}),"\n",(0,r.jsx)(n.h2,{id:"common-issues",children:"Common issues"}),"\n",(0,r.jsxs)(n.p,{children:["Problems may arise if you're using custom builds (this preset is tailored for ",(0,r.jsx)(n.code,{children:"angular-cli"})," as firstly priority). Please be advised that every entry in default configuration may be overridden to best suite your app's needs."]}),"\n",(0,r.jsx)(n.h3,{id:"cant-resolve-all-parameters-for-someclass",children:"Can't resolve all parameters for SomeClass(?)"}),"\n",(0,r.jsxs)(n.p,{children:["With Angular 8 and higher, a ",(0,r.jsx)(n.a,{href:"https://github.com/thymikee/jest-preset-angular/issues/288",children:"change to the way the Angular CLI works"})," may be causing your metadata to be lost. You can update your ",(0,r.jsx)(n.code,{children:"tsconfig.spec.json"})," to include the ",(0,r.jsx)(n.code,{children:"emitDecoratorMetadata"})," compiler option:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:' "compilerOptions": {\n "emitDecoratorMetadata": true\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In general, this is related to Angular's reflection and also depends on a reflection library, as e. g. included in ",(0,r.jsx)(n.code,{children:"core-js"}),". We use our own minimal reflection that satisfy Angular's current requirements, but in case these change, you can install ",(0,r.jsx)(n.code,{children:"core-js"})," and import the reflection library in your ",(0,r.jsx)(n.code,{children:"setup-jest.ts"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"require('core-js/es/reflect');\nrequire('core-js/proposals/reflect-metadata');\n"})}),"\n",(0,r.jsx)(n.p,{children:"Note that this might also be related to other issues with the dependency injection and parameter type reflection."}),"\n",(0,r.jsxs)(n.h3,{id:"input-bindings-are-not-reflected-into-fixture-when-changedetectionstrategyonpush-is-used",children:["@Input() bindings are not reflected into fixture when ",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.OnPush"})," is used"]}),"\n",(0,r.jsxs)(n.p,{children:["This issue is not related to Jest, ",(0,r.jsx)(n.a,{href:"https://github.com/angular/angular/issues/12313",children:"it's a known Angular bug"})]}),"\n",(0,r.jsxs)(n.p,{children:["To mitigate this, you need to wrap your component under test, into some container component with default change detection strategy (",(0,r.jsx)(n.code,{children:"ChangeDetectionStrategy.Default"}),") and pass props through it, or overwrite change detection strategy within ",(0,r.jsx)(n.code,{children:"TestBed"})," setup, if it's not critical for the test."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"// override change detection strategy\nbeforeEach(async(() => {\n TestBed.configureTestingModule({ declarations: [PizzaItemComponent] })\n .overrideComponent(PizzaItemComponent, {\n set: { changeDetection: ChangeDetectionStrategy.Default },\n })\n .compileComponents();\n}));\n"})}),"\n",(0,r.jsx)(n.h3,{id:"the-animation-trigger-transformmenu-has-failed",children:'The animation trigger "transformMenu" has failed'}),"\n",(0,r.jsx)(n.p,{children:"The currently used JSDOM version handles this, but older versions used before v7 of this preset was missing transform property. To patch it for Angular Material, use this workaround."}),"\n",(0,r.jsxs)(n.p,{children:["Add this to your ",(0,r.jsx)(n.code,{children:"jestGlobalMocks"})," file"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:"Object.defineProperty(document.body.style, 'transform', {\n value: () => {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n});\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Reference: ",(0,r.jsx)(n.a,{href:"https://github.com/angular/material2/issues/7101",children:"https://github.com/angular/material2/issues/7101"})]}),"\n",(0,r.jsx)(n.h3,{id:"unexpected-token-importexportother",children:"Unexpected token [import|export|other]"}),"\n",(0,r.jsxs)(n.p,{children:["This means, that a file is not transformed through ",(0,r.jsx)(n.code,{children:"TypeScript"})," compiler, e.g. because it is a ",(0,r.jsx)(n.code,{children:"JS"})," file with ",(0,r.jsx)(n.code,{children:"TS"})," syntax, or\nit is published to npm as uncompiled source files. Here's what you can do. A typical Jest error is like this:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"({\"Object.html-comment
)",id:"remove-html-comments-html-comment",level:3},{value:"In Jest config",id:"in-jest-config",level:4},{value:"Or in setup test environment file",id:"or-in-setup-test-environment-file",level:4},{value:"Or in individual test files",id:"or-in-individual-test-files",level:4},{value:"Display component HTML (ng-snapshot
)",id:"display-component-html-ng-snapshot",level:3},{value:"Configuration options",id:"configuration-options",level:4},{value:"In Jest config",id:"in-jest-config-1",level:4},{value:"Or in setup test environment file",id:"or-in-setup-test-environment-file-1",level:4},{value:"Or in individual test files",id:"or-in-individual-test-files-1",level:4},{value:"With options",id:"with-options",level:4},{value:"Remove Angular attributes (no-ng-attributes
)",id:"remove-angular-attributes-no-ng-attributes",level:3},{value:"In Jest config",id:"in-jest-config-2",level:4},{value:"Or in setup test environment file",id:"or-in-setup-test-environment-file-2",level:4},{value:"Or in individual test files",id:"or-in-individual-test-files-2",level:4}];function m(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"jest-preset-angular"})," provides several snapshot serializers to generate clearer and more human-readable snapshot."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"BY DEFAULT"}),", the ",(0,s.jsx)(n.a,{href:"/jest-preset-angular/docs/getting-started/presets",children:"preset"})," provides all of the snapshot serializers below."]})}),"\n",(0,s.jsx)(n.h2,{id:"snapshot-serializers",children:"Snapshot serializers"}),"\n","\n",(0,s.jsx)(a.Z,{toc:h.slice(2)}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"reference",children:"Reference"}),"\n",(0,s.jsxs)(n.h3,{id:"remove-html-comments-html-comment",children:["Remove html comments (",(0,s.jsx)(n.code,{children:"html-comment"}),")"]}),"\n",(0,s.jsx)(n.p,{children:"Allow removing all the comments in the component HTML in snapshot."}),"\n",(0,s.jsx)(n.p,{children:"Examples:"}),"\n",(0,s.jsx)(n.h4,{id:"in-jest-config",children:"In Jest config"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/html-comment'],\n //[...]\n};\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/html-comment'],\n //[...]\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-setup-test-environment-file",children:"Or in setup test environment file"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="setup-jest.js"',children:"const removeHtmlCommentsSerializer = require('jest-preset-angular/build/serializers/html-comment');\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'title="setup-jest.ts"',children:"import removeHtmlCommentsSerializer from 'jest-preset-angular/build/serializers/html-comment';\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n"})})]})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-individual-test-files",children:"Or in individual test files"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const removeHtmlCommentsSerializer = require('jest-preset-angular/build/serializers/html-comment');\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import removeHtmlCommentsSerializer from 'jest-preset-angular/build/serializers/html-comment';\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})})]}),"\n",(0,s.jsxs)(n.h3,{id:"display-component-html-ng-snapshot",children:["Display component HTML (",(0,s.jsx)(n.code,{children:"ng-snapshot"}),")"]}),"\n",(0,s.jsx)(n.p,{children:"Allow displaying component HTML with data in snapshot."}),"\n",(0,s.jsx)(n.h4,{id:"configuration-options",children:"Configuration options"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"type NgSnapshotOptions = {\n omitAllCompAttrs?: boolean;\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Configure snapshot behavior"}),"\n",(0,s.jsx)(n.p,{children:"Examples:"}),"\n",(0,s.jsx)(n.h4,{id:"in-jest-config-1",children:"In Jest config"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/ng-snapshot'],\n //[...]\n};\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/ng-snapshot'],\n //[...]\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-setup-test-environment-file-1",children:"Or in setup test environment file"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="setup-jest.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'title="setup-jest.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n"})})]})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-individual-test-files-1",children:"Or in individual test files"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"with-options",children:"With options"}),"\n",(0,s.jsxs)(n.admonition,{title:"Effective priority",type:"info",children:[(0,s.jsx)(n.p,{children:"The configured serializers will have affect in this order:"}),(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Jest config"})," -> ",(0,s.jsx)(n.code,{children:"setup files"})," -> ",(0,s.jsx)(n.code,{children:"test files"})]}),(0,s.jsx)(n.p,{children:"The later the higher priority. This means that with the same serializer, the later one will override the configuration\nof the previous one in the chain."})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"In setup files:"}),"\n"]}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="setup-jest.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="setup-jest.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n"})})]})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"or in individual test files:"}),"\n"]}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n\nit('should work', () => {\n //[...]\n});\n"})})})]}),"\n",(0,s.jsxs)(n.h3,{id:"remove-angular-attributes-no-ng-attributes",children:["Remove Angular attributes (",(0,s.jsx)(n.code,{children:"no-ng-attributes"}),")"]}),"\n",(0,s.jsxs)(n.p,{children:["Allow removing attributes generated by Angular fixture, like ",(0,s.jsx)(n.code,{children:"ng-reflect-*"}),", ",(0,s.jsx)(n.code,{children:'ng-version="*"'}),", ",(0,s.jsx)(n.code,{children:"_ngcontent-c*"})," etc., from component snapshot"]}),"\n",(0,s.jsx)(n.p,{children:"Examples:"}),"\n",(0,s.jsx)(n.h4,{id:"in-jest-config-2",children:"In Jest config"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/no-ng-attributes'],\n //[...]\n};\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/no-ng-attributes'],\n //[...]\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-setup-test-environment-file-2",children:"Or in setup test environment file"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="setup-jest.js"',children:"const removeNgAttributes = require('jest-preset-angular/build/serializers/no-ng-attributes');\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'title="setup-jest.ts"',children:"import removeNgAttributes from 'jest-preset-angular/build/serializers/no-ng-attributes';\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n"})})]})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-individual-test-files-2",children:"Or in individual test files"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const removeNgAttributes = require('jest-preset-angular/build/serializers/no-ng-attributes');\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import removeNgAttributes from 'jest-preset-angular/build/serializers/no-ng-attributes';\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n\nit('should work', () => {\n //[...]\n});\n"})})})]})]})}function j(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}}}]);
\ No newline at end of file
diff --git a/assets/js/33a5adb4.fc17da8d.js b/assets/js/33a5adb4.fc17da8d.js
deleted file mode 100644
index bf904933c8..0000000000
--- a/assets/js/33a5adb4.fc17da8d.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1591],{2153:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>p,default:()=>j,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var s=t(5893),i=t(1151),r=t(3992),l=t(425),a=t(8839);const o={id:"snapshot-testing",title:"Snapshot testing"},p=void 0,c={id:"guides/snapshot-testing",title:"Snapshot testing",description:"jest-preset-angular provides several snapshot serializers to generate clearer and more human-readable snapshot.",source:"@site/versioned_docs/version-14.2/guides/snapshot-testing.md",sourceDirName:"guides",slug:"/guides/snapshot-testing",permalink:"/jest-preset-angular/docs/guides/snapshot-testing",draft:!1,unlisted:!1,editUrl:"https://github.com/thymikee/jest-preset-angular/edit/main/website/versioned_docs/version-14.2/guides/snapshot-testing.md",tags:[],version:"14.2",lastUpdatedBy:"renovate[bot]",lastUpdatedAt:1722322746e3,frontMatter:{id:"snapshot-testing",title:"Snapshot testing"},sidebar:"docs",previous:{title:"Configure other JSDOM versions",permalink:"/jest-preset-angular/docs/guides/jsdom-version"},next:{title:"Using with Babel",permalink:"/jest-preset-angular/docs/guides/using-with-babel"}},d={},h=[{value:"Snapshot serializers",id:"snapshot-serializers",level:2},{value:"Reference",id:"reference",level:2},{value:"Remove html comments (html-comment
)",id:"remove-html-comments-html-comment",level:3},{value:"In Jest config",id:"in-jest-config",level:4},{value:"Or in setup test environment file",id:"or-in-setup-test-environment-file",level:4},{value:"Or in individual test files",id:"or-in-individual-test-files",level:4},{value:"Display component HTML (ng-snapshot
)",id:"display-component-html-ng-snapshot",level:3},{value:"Configuration options",id:"configuration-options",level:4},{value:"In Jest config",id:"in-jest-config-1",level:4},{value:"Or in setup test environment file",id:"or-in-setup-test-environment-file-1",level:4},{value:"Or in individual test files",id:"or-in-individual-test-files-1",level:4},{value:"With options",id:"with-options",level:4},{value:"Remove Angular attributes (no-ng-attributes
)",id:"remove-angular-attributes-no-ng-attributes",level:3},{value:"In Jest config",id:"in-jest-config-2",level:4},{value:"Or in setup test environment file",id:"or-in-setup-test-environment-file-2",level:4},{value:"Or in individual test files",id:"or-in-individual-test-files-2",level:4}];function m(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"jest-preset-angular"})," provides several snapshot serializers to generate clearer and more human-readable snapshot."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"BY DEFAULT"}),", the ",(0,s.jsx)(n.a,{href:"/jest-preset-angular/docs/getting-started/presets",children:"preset"})," provides all of the snapshot serializers below."]})}),"\n",(0,s.jsx)(n.h2,{id:"snapshot-serializers",children:"Snapshot serializers"}),"\n","\n",(0,s.jsx)(a.Z,{toc:h.slice(2)}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"reference",children:"Reference"}),"\n",(0,s.jsxs)(n.h3,{id:"remove-html-comments-html-comment",children:["Remove html comments (",(0,s.jsx)(n.code,{children:"html-comment"}),")"]}),"\n",(0,s.jsx)(n.p,{children:"Allow removing all the comments in the component HTML in snapshot."}),"\n",(0,s.jsx)(n.p,{children:"Examples:"}),"\n",(0,s.jsx)(n.h4,{id:"in-jest-config",children:"In Jest config"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/html-comment'],\n //[...]\n};\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/html-comment'],\n //[...]\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-setup-test-environment-file",children:"Or in setup test environment file"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="setup-jest.js"',children:"const removeHtmlCommentsSerializer = require('jest-preset-angular/build/serializers/html-comment');\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'title="setup-jest.ts"',children:"import removeHtmlCommentsSerializer from 'jest-preset-angular/build/serializers/html-comment';\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n"})})]})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-individual-test-files",children:"Or in individual test files"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const removeHtmlCommentsSerializer = require('jest-preset-angular/build/serializers/html-comment');\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import removeHtmlCommentsSerializer from 'jest-preset-angular/build/serializers/html-comment';\n\nexpect.addSnapshotSerializer(removeHtmlCommentsSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})})]}),"\n",(0,s.jsxs)(n.h3,{id:"display-component-html-ng-snapshot",children:["Display component HTML (",(0,s.jsx)(n.code,{children:"ng-snapshot"}),")"]}),"\n",(0,s.jsx)(n.p,{children:"Allow displaying component HTML with data in snapshot."}),"\n",(0,s.jsx)(n.h4,{id:"configuration-options",children:"Configuration options"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"type NgSnapshotOptions = {\n omitAllCompAttrs?: boolean;\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Configure snapshot behavior"}),"\n",(0,s.jsx)(n.p,{children:"Examples:"}),"\n",(0,s.jsx)(n.h4,{id:"in-jest-config-1",children:"In Jest config"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/ng-snapshot'],\n //[...]\n};\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/ng-snapshot'],\n //[...]\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-setup-test-environment-file-1",children:"Or in setup test environment file"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="setup-jest.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'title="setup-jest.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n"})})]})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-individual-test-files-1",children:"Or in individual test files"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer(componentSnapshotSerializer);\n\nit('should work', () => {\n //[...]\n});\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"with-options",children:"With options"}),"\n",(0,s.jsxs)(n.admonition,{title:"Effective priority",type:"info",children:[(0,s.jsx)(n.p,{children:"The configured serializers will have affect in this order:"}),(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Jest config"})," -> ",(0,s.jsx)(n.code,{children:"setup files"})," -> ",(0,s.jsx)(n.code,{children:"test files"})]}),(0,s.jsx)(n.p,{children:"The later the higher priority. This means that with the same serializer, the later one will override the configuration\nof the previous one in the chain."})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"In setup files:"}),"\n"]}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="setup-jest.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="setup-jest.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n"})})]})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"or in individual test files:"}),"\n"]}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const componentSnapshotSerializer = require('jest-preset-angular/build/serializers/ng-snapshot');\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import componentSnapshotSerializer from 'jest-preset-angular/build/serializers/ng-snapshot';\n\nexpect.addSnapshotSerializer({\n print: (val, print, indent, options, colors) =>\n componentSnapshotSerializer.print(\n val,\n print,\n indent,\n {\n ...options,\n omitAllCompAttrs: true,\n },\n colors,\n ),\n test: componentSnapshotSerializer.test,\n});\n\nit('should work', () => {\n //[...]\n});\n"})})})]}),"\n",(0,s.jsxs)(n.h3,{id:"remove-angular-attributes-no-ng-attributes",children:["Remove Angular attributes (",(0,s.jsx)(n.code,{children:"no-ng-attributes"}),")"]}),"\n",(0,s.jsxs)(n.p,{children:["Allow removing attributes generated by Angular fixture, like ",(0,s.jsx)(n.code,{children:"ng-reflect-*"}),", ",(0,s.jsx)(n.code,{children:'ng-version="*"'}),", ",(0,s.jsx)(n.code,{children:"_ngcontent-c*"})," etc., from component snapshot"]}),"\n",(0,s.jsx)(n.p,{children:"Examples:"}),"\n",(0,s.jsx)(n.h4,{id:"in-jest-config-2",children:"In Jest config"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/no-ng-attributes'],\n //[...]\n};\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n snapshotSerializers: ['jest-preset-angular/build/serializers/no-ng-attributes'],\n //[...]\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-setup-test-environment-file-2",children:"Or in setup test environment file"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsxs)(l.Z,{value:"js",label:"JavaScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab={"span":2} title="jest.config.js"',children:"/** @type {import('jest').Config} */\nmodule.exports = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.js'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="setup-jest.js"',children:"const removeNgAttributes = require('jest-preset-angular/build/serializers/no-ng-attributes');\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n"})})]}),(0,s.jsxs)(l.Z,{value:"ts",label:"TypeScript",children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab={"span":2} title="jest.config.ts"',children:"import type { Config } from 'jest';\n\nconst jestConfig: Config = {\n //[...]\n setupFilesAfterEnv: ['./setup-jest.ts'],\n //[...]\n};\n"})}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'title="setup-jest.ts"',children:"import removeNgAttributes from 'jest-preset-angular/build/serializers/no-ng-attributes';\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n"})})]})]}),"\n",(0,s.jsx)(n.h4,{id:"or-in-individual-test-files-2",children:"Or in individual test files"}),"\n",(0,s.jsxs)(r.Z,{groupId:"code-examples",children:[(0,s.jsx)(l.Z,{value:"js",label:"JavaScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'tab title="foo.component.spec.js"',children:"const removeNgAttributes = require('jest-preset-angular/build/serializers/no-ng-attributes');\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n\nit('should work', () => {\n //[...]\n});\n"})})}),(0,s.jsx)(l.Z,{value:"ts",label:"TypeScript",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",metastring:'tab title="foo.component.spec.ts"',children:"import removeNgAttributes from 'jest-preset-angular/build/serializers/no-ng-attributes';\n\nexpect.addSnapshotSerializer(removeNgAttributes);\n\nit('should work', () => {\n //[...]\n});\n"})})})]})]})}function j(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}}}]);
\ No newline at end of file
diff --git a/assets/js/388d3430.1a49bf41.js b/assets/js/388d3430.1a49bf41.js
deleted file mode 100644
index 1b30be64de..0000000000
--- a/assets/js/388d3430.1a49bf41.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[851],{1723:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var t=s(5893),r=s(1151),a=s(3992),o=s(425);const i={id:"angular-13+",title:"Angular >=13"},l=void 0,u={id:"guides/angular-13+",title:"Angular >=13",description:"Angular 13 introduces ESM package format for Angular packages. jest-preset-angular",source:"@site/versioned_docs/version-14.0/guides/angular-13+.md",sourceDirName:"guides",slug:"/guides/angular-13+",permalink:"/jest-preset-angular/docs/14.0/guides/angular-13+",draft:!1,unlisted:!1,editUrl:"https://github.com/thymikee/jest-preset-angular/edit/main/website/versioned_docs/version-14.0/guides/angular-13+.md",tags:[],version:"14.0",lastUpdatedBy:"renovate[bot]",lastUpdatedAt:1722322746e3,frontMatter:{id:"angular-13+",title:"Angular >=13"},sidebar:"docs",previous:{title:"Angular Ivy",permalink:"/jest-preset-angular/docs/14.0/guides/angular-ivy"},next:{title:"ESM Support",permalink:"/jest-preset-angular/docs/14.0/guides/esm-support"}},c={},d=[{value:"Migration steps from Angular < 13",id:"migration-steps-from-angular--13",level:2},{value:"Using ES Modules",id:"using-es-modules",level:3},{value:"Potential issues with Angular 13 ESM package format and workaround",id:"potential-issues-with-angular-13-esm-package-format-and-workaround",level:2},{value:"Cannot find modules
error when importing any deep paths from Angular ESM format packages",id:"cannot-find-modules-error-when-importing-any-deep-paths-from-angular-esm-format-packages",level:3},{value:"Usage with Angular libraries which are built with Angular CLI 13",id:"usage-with-angular-libraries-which-are-built-with-angular-cli-13",level:3},{value:"Usage with Ionic 6 or 7",id:"usage-with-ionic-6-or-7",level:3}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Angular 13"})," introduces ESM package format for Angular packages. ",(0,t.jsx)(n.code,{children:"jest-preset-angular"}),"\ncurrently supports testing with Jest in ",(0,t.jsx)(n.code,{children:"CommonJS"})," mode with ",(0,t.jsx)(n.strong,{children:"Angular 13"})," using ",(0,t.jsx)(n.a,{href:"/jest-preset-angular/docs/14.0/getting-started/presets",children:"default preset"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["With Jest 28 and ",(0,t.jsx)(n.code,{children:"jest-preset-angular"})," ",(0,t.jsx)(n.strong,{children:"v12.0.0"}),", ",(0,t.jsx)(n.code,{children:"ng-jest-resolver"})," is no longer required to have in Jest config. This\nresolver is also excluded from our default and default ESM presets."]})}),"\n",(0,t.jsxs)(n.p,{children:["Starting from ",(0,t.jsx)(n.strong,{children:"v11.0.0"}),", ",(0,t.jsx)(n.code,{children:"jest-preset-angular"})," introduces a few extra changes to be able to run Jest with ",(0,t.jsx)(n.strong,{children:"Angular 13"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"moduleFileExtensions"})," is updated to include ",(0,t.jsx)(n.code,{children:"mjs"})," files as accepted module format."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"transformIgnorePatterns"})," is added to inform Jest to transform ",(0,t.jsx)(n.code,{children:".mjs"})," files."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"transform"})," is updated to include ",(0,t.jsx)(n.code,{children:".mjs"})," extension to transform to ",(0,t.jsx)(n.code,{children:"CommonJS"})," codes."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"migration-steps-from-angular--13",children:"Migration steps from Angular < 13"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Upgrade the project to ",(0,t.jsx)(n.strong,{children:"Angular 13"})," following ",(0,t.jsx)(n.a,{href:"https://update.angular.io/",children:"guide"})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"If one is using the default preset as following:"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.Z,{groupId:"code-examples",children:[(0,t.jsx)(o.Z,{value:"js",label:"JavaScript",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",metastring:"tab",children:"// jest.config.js\nmodule.exports = {\n preset: 'jest-preset-angular',\n};\n"})})}),(0,t.jsx)(o.Z,{value:"ts",label:"TypeScript",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-ts",metastring:"tab",children:"// jest.config.ts\nimport type { Config } from 'jest';\n\nconst jestConfig: Config = {\n preset: 'jest-preset-angular',\n};\n\nexport default jestConfig;\n"})})})]}),"\n",(0,t.jsx)(n.p,{children:"there are no migration steps required"}),"\n",(0,t.jsx)(n.h3,{id:"using-es-modules",children:"Using ES Modules"}),"\n",(0,t.jsxs)(n.p,{children:["ES Modules support is new and may encounter issues. See ",(0,t.jsx)(n.a,{href:"https://github.com/thymikee/jest-preset-angular/tree/main/examples/example-app-v13",children:"example-app-v13"})," for an example with tests that run using ESM, and using ESM + isolated."]}),"\n",(0,t.jsxs)(n.p,{children:["Your ",(0,t.jsx)(n.code,{children:"jest.config.js"})," should be changed to something like:"]}),"\n",(0,t.jsxs)(a.Z,{groupId:"code-examples",children:[(0,t.jsx)(o.Z,{value:"js",label:"JavaScript",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",metastring:"tab",children:"// jest.config.js\nconst { pathsToModuleNameMapper } = require('ts-jest/utils');\nconst { paths } = require('./tsconfig.json').compilerOptions;\n\n/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */\nmodule.exports = {\n preset: 'jest-preset-angular/presets/defaults-esm',\n transform: {\n '^.+\\\\.(ts|js|html|svg)$': [\n 'jest-preset-angular',\n {\n tsconfig: '