-
Notifications
You must be signed in to change notification settings - Fork 16
/
ava_snapshots.node_cli.txt
41 lines (27 loc) · 2.87 KB
/
ava_snapshots.node_cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
AVA_SNAPSHOTS
ALTERNATIVES ==> #See Jest snapshots
VERSION ==> #Part of ava (see its doc)
/=+===============================+=\
/ : : \
)==: ASSERTIONS :==(
\ :_______________________________: /
\=+===============================+=/
TEST.snapshot(VAL) #Compare against snapshot
#Write snapshot first time it is called
#Fail if run in CI and no snapshots found.
/=+===============================+=\
/ : : \
)==: FILES :==(
\ :_______________________________: /
\=+===============================+=/
CONF.snapshotDir #'PATH'. Def:
# - TEST_FILE/../snapshots/FILE.snap (binary file)
# - TEST_FILE/../__snapshots__/... instead if inside __tests__/
#Also creates sibling FILE.md which contains description of snapshot
# - used to show --update-snapshots's diff on new git commit
#When compiling test files and using source maps, use them (i.e. store snapshots as
#siblings to non-compiled test files)
AVA.meta.snapshotDirectory #'PATH'_URL
--update-snapshots|u #Write snapshot, and prune old ones