Use intros for meta descriptions
This commit is contained in:
parent
219e2f9ff6
commit
dc66dceaa7
|
@ -1,5 +1,7 @@
|
||||||
{%
|
{%
|
||||||
if page.type == 'article'
|
if page.intro
|
||||||
|
%}{{ page.intro | markdownify | strip_html }}{%
|
||||||
|
elsif page.type == 'article'
|
||||||
%}A comprehensive cheatsheet for {{ page.title }}.{%
|
%}A comprehensive cheatsheet for {{ page.title }}.{%
|
||||||
endif
|
endif
|
||||||
%}
|
%}
|
||||||
|
|
6
jest.md
6
jest.md
|
@ -4,6 +4,8 @@ category: JavaScript libraries
|
||||||
layout: 2017/sheet
|
layout: 2017/sheet
|
||||||
updated: 2017-09-01
|
updated: 2017-09-01
|
||||||
weight: -3
|
weight: -3
|
||||||
|
intro: |
|
||||||
|
A quick overview to [Jest](https://facebook.github.io/jest/), a test framework for Node.js. This guide targets Jest v20.
|
||||||
---
|
---
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
|
@ -328,8 +330,9 @@ See: [.mock property](http://facebook.github.io/jest/docs/en/mock-functions.html
|
||||||
const fn = jest.fn(() => 'hello')
|
const fn = jest.fn(() => 'hello')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### or:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// or:
|
|
||||||
jest.fn().mockReturnValue('hello')
|
jest.fn().mockReturnValue('hello')
|
||||||
jest.fn().mockReturnValueOnce('hello')
|
jest.fn().mockReturnValueOnce('hello')
|
||||||
```
|
```
|
||||||
|
@ -351,6 +354,5 @@ fn() // → 2
|
||||||
## References
|
## References
|
||||||
{: .-one-column}
|
{: .-one-column}
|
||||||
|
|
||||||
- Based on Jest v20.
|
|
||||||
- <http://facebook.github.io/jest/>
|
- <http://facebook.github.io/jest/>
|
||||||
{: .-also-see}
|
{: .-also-see}
|
||||||
|
|
Loading…
Reference in New Issue