OSDN Git Service

Regular updates
authorErik <erikgronwal@users.osdn.me>
Wed, 17 Jun 2020 14:55:05 +0000 (23:55 +0900)
committerErik <erikgronwal@users.osdn.me>
Wed, 17 Jun 2020 14:55:05 +0000 (23:55 +0900)
bash.md
jest.md

diff --git a/bash.md b/bash.md
index c62e460..3a3b615 100644 (file)
--- a/bash.md
+++ b/bash.md
@@ -455,6 +455,7 @@ Fruits[2]="Orange"
 
 ```bash
 echo ${Fruits[0]}           # Element #0
+echo ${Fruits[-1]}          # Last element
 echo ${Fruits[@]}           # All elements, space-separated
 echo ${#Fruits[@]}          # Number of elements
 echo ${#Fruits}             # String length of the 1st element
diff --git a/jest.md b/jest.md
index f1527c4..629fb60 100644 (file)
--- a/jest.md
+++ b/jest.md
@@ -124,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