{"id":2533,"date":"2022-07-11T19:26:22","date_gmt":"2022-07-11T10:26:22","guid":{"rendered":"https:\/\/mattarishitemota.com\/?p=2533"},"modified":"2022-07-11T22:31:34","modified_gmt":"2022-07-11T13:31:34","slug":"%e4%bb%8a%e3%81%95%e3%82%89-expo-sdk36-%e3%81%a7-jest-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%83%a6%e3%83%8b%e3%83%83%e3%83%88%e3%83%86%e3%82%b9%e3%83%88%e3%81%97%e3%81%9f%e3%81%84","status":"publish","type":"post","link":"https:\/\/mattarishitemota.com\/?p=2533","title":{"rendered":"\u4eca\u3055\u3089 Expo SDK36 \u3067 jest \u3092\u4f7f\u3063\u3066\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3057\u305f\u3044"},"content":{"rendered":"\n<p>Expo \u306e\u30a2\u30d7\u30ea\u3067\u3001\u30ed\u30b8\u30c3\u30af\u304c\u8907\u96d1\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u95a2\u6570\u3092\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3057\u305f\u3044\u3002\u3057\u304b\u3082\u30bd\u30fc\u30b9\u306f TypeScript\u3002<\/p>\n\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u4e0b\u8a18\u306b\u6cbf\u3063\u3066 jest \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30c6\u30b9\u30c8\u3092\u66f8\u3044\u3066\u307f\u305f\u304c\u3001ESM \u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u66f8\u304f\u306b\u306f\u3069\u3046\u3059\u308c\u3070\uff1f\uff1f\u3068\u8e93\u3044\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/jestjs.io\/ja\/docs\/getting-started\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/jestjs.io\/ja\/docs\/getting-started<\/a><\/p>\n\n\n\n<p>Expo \u3067\u306e\u3084\u308a\u65b9\u3092\u8abf\u3079\u308b\u3068\u3001jest-expo \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u308d\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.expo.dev\/guides\/testing-with-jest\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.expo.dev\/guides\/testing-with-jest\/<\/a><\/p>\n\n\n\n<p>\u304c\u3001\u3053\u306e\u624b\u9806\u3060\u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u65b0\u3057\u3059\u304e\u3066\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u304c&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-verse\">Cannot find module \u2018react-native\/Libraries\/LogBox\/LogBox\u2019 from \u2018setup.js\u2019\n    at Resolver.resolveModule (node_modules\/jest-resolve\/build\/index.js:299:11)\n    at Object. (node_modules\/jest-expo\/src\/preset\/setup.js:155:6)<\/pre>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4e00\u65e6\u3059\u3079\u3066 yarn remove \u3057\u3066\u304b\u3089\u4e0b\u8a18\u3067\u3046\u307e\u304f\u3044\u3063\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn add jest-expo@36.0.1 --dev\nyarn add --dev @types\/jest<\/code><\/pre><\/div>\n\n\n\n<p>\u4eca\u306e\u3068\u3053\u308d\u3001\u30d3\u30e5\u30fc\u5074\u3092\u30c6\u30b9\u30c8\u3059\u308b\u3064\u3082\u308a\u306f\u306a\u3044\u306e\u3067 react-test-renderer \u5165\u308c\u306a\u304b\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u8a2d\u5b9a\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-file=\"package.json\" data-lang=\"JSON\"><code>  &quot;scripts&quot;: {\n    :\n    &quot;test&quot;: &quot;node_modules\/.bin\/jest&quot;\n  },\n  &quot;jest&quot;: {\n    &quot;preset&quot;: &quot;jest-expo&quot;\n  },\n<\/code><\/pre><\/div>\n\n\n\n<p>\u7121\u4e8b yarn test \u3067\u5b9f\u884c\u3067\u304d\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Expo \u306e\u30a2\u30d7\u30ea\u3067\u3001\u30ed\u30b8\u30c3\u30af\u304c\u8907\u96d1\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u95a2\u6570\u3092\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3057\u305f\u3044\u3002\u3057\u304b\u3082\u30bd\u30fc\u30b9\u306f TypeScript\u3002 \u3068\u308a\u3042\u3048\u305a\u4e0b\u8a18\u306b\u6cbf\u3063\u3066 jest \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30c6\u30b9\u30c8\u3092\u66f8\u3044\u3066\u307f\u305f\u304c\u3001ESM \u306e\u30a4\u30f3\u30dd\u30fc\u30c8 <span class=\"more-text\">&hellip;<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[21],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2518,"url":"https:\/\/mattarishitemota.com\/?p=2518","url_meta":{"origin":2533,"position":0},"title":"Expo\u3067firebase\u3092\u4f7f\u3044\u305f\u3044","author":"Owner","date":"2022\u5e747\u67088\u65e5","format":false,"excerpt":"\u4e0b\u8a18\u306e\u516c\u5f0f\u30ac\u30a4\u30c9\u306b\u6cbf\u3063\u3066\u5c0e\u5165\u3057\u305f\u3068\u3053\u308d\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30a8\u30e9\u30fc\u3002 https:\/\/firebase.g\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":444,"url":"https:\/\/mattarishitemota.com\/?p=444","url_meta":{"origin":2533,"position":1},"title":"Expo\u516c\u5f0f\u30da\u30fc\u30b8\u306b\u3042\u308bAR\u30b5\u30f3\u30d7\u30eb\u304c\u52d5\u304b\u306a\u3044","author":"Owner","date":"2020\u5e743\u67083\u65e5","format":false,"excerpt":"AR\u304c\u3069\u3093\u306a\u3082\u306e\u304b\u8a66\u3057\u305f\u304f\u3066\u3001\u4e0b\u8a18\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u52d5\u304b\u305d\u3046\u3068\u3057\u305f\u304c\u3001\u30d3\u30eb\u30c9\u5931\u6557\u3059\u308b\u3002 https:\/\/d\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1080,"url":"https:\/\/mattarishitemota.com\/?p=1080","url_meta":{"origin":2533,"position":2},"title":"Expo\u3067\u4f5c\u3063\u305f\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u306b\u306f","author":"Owner","date":"2020\u5e749\u67087\u65e5","format":false,"excerpt":"\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3059\u308b\u306e\u306bExpo\u304c\u4fbf\u5229\u3002\u516c\u5f0f\u624b\u9806\u306b\u6cbf\u3063\u3066\u5b9f\u65bd\u3059\u308c\u3070\u3001iPhone\u5b9f\u6a5f\u3067\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":611,"url":"https:\/\/mattarishitemota.com\/?p=611","url_meta":{"origin":2533,"position":3},"title":"Angular\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\uff085.2.11\u21926.x\uff09","author":"Owner","date":"2020\u5e744\u67084\u65e5","format":false,"excerpt":"4\u21925\u306b\u5f15\u304d\u7d9a\u304d\u3001Angular Update Guide \u306b\u5f93\u3044\u5bfe\u5fdc\u3057\u3066\u307f\u308b\u3002 https:\/\/u\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":480,"url":"https:\/\/mattarishitemota.com\/?p=480","url_meta":{"origin":2533,"position":4},"title":"Expo\u30a2\u30d7\u30ea\u3067localStorage\u3092\u4f7f\u3044\u305f\u3044","author":"Owner","date":"2020\u5e743\u670812\u65e5","format":false,"excerpt":"Expo\u3067\u958b\u767a\u4e2d\u306b\u624b\u8efd\u306b\u8a2d\u8a08\u5024\u3092\u6c38\u7d9a\u5316\u3057\u305f\u304f\u306a\u3063\u305f\u3002JavaScript\u3060\u3068localStorage\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":440,"url":"https:\/\/mattarishitemota.com\/?p=440","url_meta":{"origin":2533,"position":5},"title":"Expo\u3067\u306e\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u958b\u767a\u304c\u5feb\u9069","author":"Owner","date":"2020\u5e742\u670828\u65e5","format":false,"excerpt":"JavaScript\u3067\u30cd\u30a4\u30c6\u30a3\u30d6\u306e\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3067\u304d\u308bReact Native\u3092\u30e9\u30c3\u30d1\u30fc\u3057\u305f\u3001E\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts\/2533"}],"collection":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2533"}],"version-history":[{"count":3,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts\/2533\/revisions"}],"predecessor-version":[{"id":2536,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts\/2533\/revisions\/2536"}],"wp:attachment":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}