Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 2018-07-10-391draft.md
  • Loading branch information
azu authored Jul 10, 2018
commit 3415251ee5cc689bd7b7dfd7eb658d02aef564ac
35 changes: 33 additions & 2 deletions _i18n/ja/_posts/2018/2018-07-10-391draft.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
---
title: "2018-07-10のJS: "
title: "2018-07-10のJS: Jest 23.3.0 インラインスナップショット、npm.community"
author: "azu"
layout: post

date : 2018-07-10T01:59:55.517Z
category: JSer
tags:
- jest
- npm
-

---

JSer.info #391
JSer.info #391 - テストフレームワークのJest 23.3.0がリリースされました。

- [jest/CHANGELOG.md at v23.3.0 · facebook/jest](https://github.com/facebook/jest/blob/v23.3.0/CHANGELOG.md)

Jest 23.3.0では`toMatchInlineSnapshot`と`toThrowErrorMatchingInlineSnapshot`が追加されています。
いままでの[スナップショットテスト](https://jestjs.io/docs/snapshot-testing.html)は、スナップショットを外部ファイルとして保存していましたが、このInlineSnapshotはテストを実行するとテストコードを書き換えてコード内にスナップショットを保存します。

![`expect(x).toMatchInlineSnapshot()`](https://camo.githubusercontent.com/98d26f2884ec3280f89c2402ed2a397bd96709e3/68747470733a2f2f692e696d6775722e636f6d2f563651565934332e676966)

このInlineSnapshotは[Prettier](https://prettier.io/)で整形されるのが前提となっているのため、プロジェクトにはprettierに依存が必要となっています。
また、JavaScript以外にもTypeScriptでも動作するようになっています。

- [\[RFC\] Inline Snapshots by azz · Pull Request #6380 · facebook/jest](https://github.com/facebook/jest/pull/6380)

----

[The npm Blog — Announcing npm.community](https://blog.npmjs.org/post/175587538995/announcing-npmcommunity)という記事では今後のnpmのIssueの扱い方について書かれています。

今までは[npm/npm](https://github.com/npm/npm)などのIssueに問題を報告されていましたが、今後は[npm.community](https://npm.community/)というフォーラムでIssueを取り扱うことについて書かれています。
そのため、Pull Requestはリポジトリに対して行いますが、Issueはフォーラムの特定のカテゴリに投稿することが推奨されています。

----

お知らせ

そろそろ400回目が近づいてきたので、400回記念イベントのIssueを立てました。
まだ何をするかやどこでするかも決まっていませんが、意見があればIssue、[Twitter#jserinfo](https://twitter.com/search?f=realtime&q=%20%23jserinfo)、[![Gitter](https://badges.gitter.im/jser/jser.info.svg)](https://gitter.im/jser/jser.info?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)などにどうぞ。

- [JSer.info 400回記念イベント · Issue #102 · jser/jser.info](https://github.com/jser/jser.info/issues/102)

----

Expand Down