|
7 | 7 | ] |
8 | 8 | `; |
9 | 9 |
|
| 10 | +exports[`pre-commit disables DocToc and forwards args 1`] = ` |
| 11 | +Array [ |
| 12 | + lint-staged --config .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json --verbose --some-other-arg, |
| 13 | + npm run validate, |
| 14 | +] |
| 15 | +`; |
| 16 | + |
| 17 | +exports[`pre-commit disables DocToc and forwards args 2`] = ` |
| 18 | +Array [ |
| 19 | + .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json, |
| 20 | + {"*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx|vue)":["./src/index.js format"],"*.+(js|jsx|ts|tsx)":["./src/index.js lint"],"*.+(tsx|ts|jsx|js)":["./src/index.js test --findRelatedTests"]}, |
| 21 | +] |
| 22 | +`; |
| 23 | + |
| 24 | +exports[`pre-commit disables DocToc, overrides built-in test command, and forwards args 1`] = ` |
| 25 | +Array [ |
| 26 | + lint-staged --config .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json --verbose --some-other-arg, |
| 27 | + npm run validate, |
| 28 | +] |
| 29 | +`; |
| 30 | + |
| 31 | +exports[`pre-commit disables DocToc, overrides built-in test command, and forwards args 2`] = ` |
| 32 | +Array [ |
| 33 | + .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json, |
| 34 | + {"*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx|vue)":["./src/index.js format"],"*.+(js|jsx|ts|tsx)":["./src/index.js lint"],"*.+(tsx|ts|jsx|js)":["yarn test:custom --findRelatedTests foo.js"]}, |
| 35 | +] |
| 36 | +`; |
| 37 | + |
10 | 38 | exports[`pre-commit does not run validate script if it's not defined 1`] = ` |
11 | 39 | Array [ |
12 | 40 | lint-staged --config ./src/config/lintstagedrc.js, |
@@ -83,27 +111,13 @@ Array [ |
83 | 111 | ] |
84 | 112 | `; |
85 | 113 |
|
86 | | -exports[`pre-commit overrides built-in test command with --testCommand 2`] = ` |
87 | | -Array [ |
88 | | - .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json, |
89 | | - {"README.md":["doctoc --maxlevel 4 --notitle"],"*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx|vue)":["./src/index.js format"],"*.+(js|jsx|ts|tsx)":["./src/index.js lint"],"*.+(tsx|ts|jsx|js)":["yarn test:custom --findRelatedTests foo.js"]}, |
90 | | -] |
91 | | -`; |
92 | | - |
93 | 114 | exports[`pre-commit overrides built-in test command with --testCommand and forwards args 1`] = ` |
94 | 115 | Array [ |
95 | 116 | lint-staged --config .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json --verbose, |
96 | 117 | npm run validate, |
97 | 118 | ] |
98 | 119 | `; |
99 | 120 |
|
100 | | -exports[`pre-commit overrides built-in test command with --testCommand and forwards args 2`] = ` |
101 | | -Array [ |
102 | | - .test-tmp/hover-javascriptTMPSUFFIX/.lintstaged.json, |
103 | | - {"README.md":["doctoc --maxlevel 4 --notitle"],"*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx|vue)":["./src/index.js format"],"*.+(js|jsx|ts|tsx)":["./src/index.js lint"],"*.+(tsx|ts|jsx|js)":["yarn test:custom --findRelatedTests foo.js"]}, |
104 | | -] |
105 | | -`; |
106 | | - |
107 | 121 | exports[`pre-commit throws an error when \`--config\` and \`--testCommand\` are used together 1`] = `[Error: @hover/javascript/pre-commit: --config and --testCommand cannot be used together (--testCommand only works with built-in lint-staged configuration)]`; |
108 | 122 |
|
109 | 123 | exports[`pre-commit throws an error when invalid \`--testCommand\` is provided 1`] = `[Error: @hover/javascript/pre-commit: invalid --testCommand]`; |
0 commit comments