Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhbaker committed Aug 15, 2024
1 parent 607fcc3 commit f10380d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/derive-typescript/src/codegen/mapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ mod test {
fn schema_generation() {
let fixture = serde_yaml::from_slice(include_bytes!("mapper_test.yaml")).unwrap();
let mut sources = sources::scenarios::evaluate_fixtures(Default::default(), &fixture);
sources::inline_sources(&mut sources);
sources::inline_draft_catalog(&mut sources);

let tables::Sources {
let tables::DraftCatalog {
collections,
errors,
..
Expand All @@ -283,7 +283,10 @@ mod test {
let mut w = String::new();

for collection in collections.iter() {
let m = Mapper::new(collection.spec.schema.as_ref().unwrap().get(), "Doc");
let m = Mapper::new(
collection.model.clone().unwrap().schema.unwrap().get(),
"Doc",
);
writeln!(
&mut w,
"Schema for {name} with CURI {curi} with anchors:",
Expand All @@ -294,7 +297,7 @@ mod test {
m.map(m.root()).render(&mut Context::new(&mut w));
w.push_str("\n\n");

let m = Mapper::new(collection.spec.schema.as_ref().unwrap().get(), "");
let m = Mapper::new(collection.model.clone().unwrap().schema.unwrap().get(), "");
writeln!(
&mut w,
"Schema for {name} with CURI {curi} without anchors:",
Expand Down

0 comments on commit f10380d

Please sign in to comment.