File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed
test-fuzz/tests/integration Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -184,35 +184,18 @@ fn remove_avatars(value: &mut serde_json::Value) {
184
184
185
185
#[ test]
186
186
fn markdown_link_check ( ) {
187
- // Check if npm is installed before proceeding
188
- if Command :: new ( "which" ) . arg ( "npm" ) . output ( ) . is_err ( ) {
189
- println ! ( "Skipping markdown link check: npm not found." ) ;
190
- return ;
191
- }
192
-
193
- let tempdir = tempdir ( ) . expect ( "Failed to create temporary directory" ) ;
187
+ let tempdir = tempdir ( ) . unwrap ( ) ;
194
188
195
- // Install markdown-link-check locally in the temp directory
196
189
Command :: new ( "npm" )
197
190
. args ( [ "install" , "markdown-link-check" ] )
198
191
. current_dir ( & tempdir)
199
192
. logged_assert ( )
200
193
. success ( ) ;
201
194
202
- // Construct the path to README.md relative to the crate root
203
- let readme_md = Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) )
204
- . parent ( )
205
- . unwrap ( )
206
- . join ( "README.md" ) ;
195
+ let readme_md = Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) . join ( "../README.md" ) ;
207
196
208
- // Run markdown-link-check using npx from the temp directory
209
197
Command :: new ( "npx" )
210
- . args ( [
211
- "markdown-link-check" ,
212
- "-q" ,
213
- "-v" ,
214
- & readme_md. to_string_lossy ( ) ,
215
- ] )
198
+ . args ( [ "markdown-link-check" , readme_md. to_str ( ) . unwrap ( ) ] )
216
199
. current_dir ( & tempdir)
217
200
. logged_assert ( )
218
201
. success ( ) ;
You can’t perform that action at this time.
0 commit comments