OSDN Git Service
(root)
/
twpd
/
master.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Regular updates
[twpd/master.git]
/
nodejs-assert.md
1
---
2
title: assert
3
category: Node.js
4
layout: 2017/sheet
5
---
6
7
### Assertions
8
9
```js
10
assert(val)
11
assert.equal(actual, expected)
12
assert.notEqual(a, e)
13
```
14
15
```js
16
assert.deepEqual(a, e)
17
assert.notDeepEqual(a, e)
18
```
19
20
```js
21
assert.throws(fn)
22
```
23
24
### References
25
26
- http://nodejs.org/api/assert.html