Skip to content

Commit

Permalink
Add a test case to detect changes in generate json-schema output
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlarsen committed Dec 2, 2024
1 parent e8f9d52 commit 5976058
Show file tree
Hide file tree
Showing 3 changed files with 533 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/noseyparker-cli/tests/generate/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Tests for Nosey Parker `generate` functionality
use super::*;

#[test]
fn generate_json_schema() {
let cmd = noseyparker_success!("generate", "json-schema");

let output = cmd.get_output();
let status = output.status;
assert!(status.success());
let stdout: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
assert_json_snapshot!(stdout);
let stderr = String::from_utf8(output.stderr.clone()).unwrap();
assert_eq!(stderr, "");
}
Loading

0 comments on commit 5976058

Please sign in to comment.