ユーザ用ツール

サイト用ツール


reactnative:jest

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
reactnative:jest [2019/03/05 00:56]
ips
reactnative:jest [2019/03/05 01:09] (現在)
ips
ライン 10: ライン 10:
 npm i jest npm i jest
 </​code>​ </​code>​
 +
 +===== package.json =====
 <​code>​ <​code>​
 //​package.jsonに追加 //​package.jsonに追加
ライン 16: ライン 18:
 }, },
 "​jest":​ { "​jest":​ {
-  "​preset":​ "​jest-expo"​+  "​preset":​ "​jest-expo"​
 +  "​testEnvironment":​ "​node"​ //​必須ではない。jsdomを無効にしてテストを早くする
 } }
 </​code>​ </​code>​
 <​code>​ <​code>​
 npm test  npm test 
 +npm test -- --watch ​ // ウォッチモードの場合
 </​code>​ </​code>​
  
ライン 213: ライン 217:
     math.add = originalAdd;​     math.add = originalAdd;​
     expect(app.doAdd(1,​ 2)).toEqual(3);​     expect(app.doAdd(1,​ 2)).toEqual(3);​
-  });+  }) 
 +})  ​
 </​code>​ </​code>​
  
  
reactnative/jest.1551714978.txt.gz · 最終更新: 2019/03/05 00:56 by ips