/
index.spec.js.snap
90 lines (74 loc) · 2.33 KB
/
index.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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`lintStaged should exit with code 1 on linter errors 1`] = `
"
ERROR
× node -e \\"process.exit(1)\\" failed without output (FAILED)."
`;
exports[`lintStaged should load an npm config package when specified 1`] = `
"
LOG Running lint-staged with the following config:
LOG {
'*': 'mytask'
}"
`;
exports[`lintStaged should load config file when specified 1`] = `
"
LOG Running lint-staged with the following config:
LOG {
'*': 'mytask'
}"
`;
exports[`lintStaged should not output config in normal mode 1`] = `""`;
exports[`lintStaged should output config in debug mode 1`] = `
"
LOG Running lint-staged with the following config:
LOG {
'*': 'mytask'
}"
`;
exports[`lintStaged should parse function linter from js config 1`] = `
"
LOG Running lint-staged with the following config:
LOG {
'*.css': filenames => \`echo \${filenames.join(' ')}\`,
'*.js': filenames => filenames.map(filename => \`echo \${filename}\`)
}"
`;
exports[`lintStaged should print helpful error message when config file is not found 2`] = `
"
ERROR Config could not be found.
ERROR
ERROR Please make sure you have created it correctly.
See https://github.com/okonet/lint-staged#configuration."
`;
exports[`lintStaged should print helpful error message when explicit config file is not found 1`] = `
ERROR Could not parse lint-staged config.
Error: ENOENT: no such file or directory, open 'fake-config-file.yml'
ERROR
ERROR Please make sure you have created it correctly.
See https://github.com/okonet/lint-staged#configuration.
`;
exports[`lintStaged should throw when invalid config is provided 2`] = `
"
ERROR Could not parse lint-staged config.
Error: Configuration should not be empty!
ERROR
ERROR Please make sure you have created it correctly.
See https://github.com/okonet/lint-staged#configuration."
`;
exports[`lintStaged should use config object 1`] = `
"
LOG Running lint-staged with the following config:
LOG {
'*': 'node -e \\"process.exit(1)\\"'
}"
`;
exports[`lintStaged should use cosmiconfig if no params are passed 1`] = `""`;
exports[`lintStaged should use use the console if no logger is passed 1`] = `
"
ERROR Could not parse lint-staged config.
Error: Configuration should not be empty!
ERROR
ERROR Please make sure you have created it correctly.
See https://github.com/okonet/lint-staged#configuration."
`;