astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

some test ideas for function call #32

Closed slashformotion closed 1 year ago

slashformotion commented 1 year ago
test_snippet!(
    spacing_around_args,
    expect = "#lorem(9)",
    "#lorem( 9 )",
    &[IdentItemFunc.as_dyn()]
);
test_snippet!(
    spacing_around_args,
    expect = "#lorem(9, 9)",
    "#lorem( 9,9  )",
    &[IdentItemFunc.as_dyn()]
);
slashformotion commented 1 year ago

I forked your project and i am not quite sure what are you testing in your test_snippets.

I am stil very much a newbie at writing rust but i don't get what test is supposed to test what.

astrale-sharp commented 1 year ago

Lots of things changed now, the rules have been abandonned! new test just look like : make_test!("some typst code"); then you run cargo insta test && cargo insta review and you decide if it's pretty enough for you!