OSDN Git Service

Regular updates
[twpd/master.git] / jest.md
diff --git a/jest.md b/jest.md
index e02d1f6..3143aaf 100644 (file)
--- a/jest.md
+++ b/jest.md
@@ -2,7 +2,7 @@
 title: Jest
 category: JavaScript libraries
 layout: 2017/sheet
-updated: 2017-09-01
+updated: 2020-06-17
 weight: -3
 tags: [Featurable]
 intro: |
@@ -93,6 +93,15 @@ it.skip(ยทยทยท) // alias: xit()
 
 See: [test.skip](http://facebook.github.io/jest/docs/en/api.html#testskipname-fn)
 
+
+### Optional flags
+
+| Flag                  | Description                              |
+| --------------------- | ---------------------------------------- |
+| `--coverage`          | See a summary of test coverage           |
+| `--detectOpenHandles` | See a summary of ports that didn't close |
+| `--runInBand`         | Run all tests one after the other        |
+
 Expect
 ------
 {: .-three-column}
@@ -115,8 +124,12 @@ See: [expect()](http://facebook.github.io/jest/docs/en/expect.html#expectvalue)
 ```js
 expect(value)
   .toMatchSnapshot()
+  .toMatchInlineSnapshot()
 ```
 
+Note that `toMatchInlineSnapshot()` requires Prettier to be set up for the project.
+See: [Inline snapshots](https://jestjs.io/docs/en/snapshot-testing#inline-snapshots)
+
 ### Errors
 
 ```js