/
runAll.spec.js.snap
117 lines (107 loc) Β· 3.71 KB
/
runAll.spec.js.snap
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`runAll should not skip stashing and restoring if there are partially staged files 1`] = `
"
LOG Stashing changes... [started]
LOG Stashing changes... [completed]
LOG Running linters... [started]
LOG Running tasks for *.js [started]
LOG echo \\"sample\\" [started]
LOG echo \\"sample\\" [completed]
LOG Running tasks for *.js [completed]
LOG Running linters... [completed]
LOG Updating stash... [started]
LOG Updating stash... [completed]
LOG Restoring local changes... [started]
LOG Restoring local changes... [completed]"
`;
exports[`runAll should not skip tasks if there are files 1`] = `
"
LOG Stashing changes... [started]
LOG Stashing changes... [skipped]
LOG β No partially staged files found...
LOG Running linters... [started]
LOG Running tasks for *.js [started]
LOG echo \\"sample\\" [started]
LOG echo \\"sample\\" [completed]
LOG Running tasks for *.js [completed]
LOG Running linters... [completed]"
`;
exports[`runAll should reject promise when error during getStagedFiles 1`] = `"Unable to get staged files!"`;
exports[`runAll should resolve the promise with no files 1`] = `
"
LOG No staged files match any of provided globs."
`;
exports[`runAll should skip linters and stash update but perform working copy restore if terminated 1`] = `
"
LOG Stashing changes... [started]
LOG Stashing changes... [completed]
LOG Running linters... [started]
LOG Running tasks for *.js [started]
LOG echo \\"sample\\" [started]
LOG echo \\"sample\\" [failed]
LOG β
LOG Running tasks for *.js [failed]
LOG β
LOG Running linters... [failed]
LOG Updating stash... [started]
LOG Updating stash... [skipped]
LOG β Skipping stash update since some tasks exited with errors
LOG Restoring local changes... [started]
LOG Restoring local changes... [completed]
LOG {
name: 'ListrError',
errors: [
{
privateMsg: '\\\\n\\\\n\\\\nβΌ echo \\"sample\\" was terminated with SIGINT',
context: {hasStash: true, hasErrors: true}
}
],
context: {hasStash: true, hasErrors: true}
}"
`;
exports[`runAll should skip stashing and restoring if there are no partially staged files 1`] = `
"
LOG Stashing changes... [started]
LOG Stashing changes... [skipped]
LOG β No partially staged files found...
LOG Running linters... [started]
LOG Running tasks for *.js [started]
LOG echo \\"sample\\" [started]
LOG echo \\"sample\\" [completed]
LOG Running tasks for *.js [completed]
LOG Running linters... [completed]"
`;
exports[`runAll should skip stashing changes if no lint-staged files are changed 1`] = `
"
LOG No staged files match any of provided globs."
`;
exports[`runAll should skip updating stash if there are errors during linting 1`] = `
"
LOG Stashing changes... [started]
LOG Stashing changes... [completed]
LOG Running linters... [started]
LOG Running tasks for *.js [started]
LOG echo \\"sample\\" [started]
LOG echo \\"sample\\" [failed]
LOG β
LOG Running tasks for *.js [failed]
LOG β
LOG Running linters... [failed]
LOG Updating stash... [started]
LOG Updating stash... [skipped]
LOG β Skipping stash update since some tasks exited with errors
LOG Restoring local changes... [started]
LOG Restoring local changes... [completed]
LOG {
name: 'ListrError',
errors: [
{
privateMsg: '\\\\n\\\\n\\\\nΓ echo \\"sample\\" found some errors. Please fix them and try committing again.\\\\n\\\\nLinter finished with error',
context: {hasStash: true, hasErrors: true}
}
],
context: {hasStash: true, hasErrors: true}
}"
`;
exports[`runAll should throw when invalid config is provided 1`] = `"Invalid config provided to runAll! Use getConfig instead."`;
exports[`runAll should throw when invalid config is provided 2`] = `"Invalid config provided to runAll! Use getConfig instead."`;