Skip to content

Releases: approvals/ApprovalTests.Java

InlineOptions.semiAutomaticWithPreviousApproved()

20 May 17:20
Compare
Choose a tag to compare

Options.addReporter(reporter)

13 May 17:23
892c2b1
Compare
Choose a tag to compare

You can call addReporter(reporter) on Options and it will open both/all reporters on test failure.

InlineOptions

06 May 18:20
Compare
Choose a tag to compare

BREAKING CHANGE

verify(result, options=Options().inline(expected, showCode=false))
verify(result, options=Options().inline(expected, showCode=true))

is now

verify(result, options=Options().inline(expected, InlineOptions.showCode(false)))
verify(result, options=Options().inline(expected))

New Features

You can now do InlineOptions.automatic() and InlineOptions.semiAutomatic().

ParseInput with 3 parameters

15 Apr 17:00
6527c11
Compare
Choose a tag to compare

Added ParseInput with 3 parameters and allows arrays as last argument for ParseInput with 2 and 3 Parameters. To understand this you might want to have a look at the python documentation.

23.0.1

27 Mar 17:03
Compare
Choose a tag to compare

Fixes

Fixed a bug where long header threw an exception

New

StringUtils.repeat(text, times);

Minor bugs with InlineApprovals + changes to StringUtils.split

07 Mar 23:00
Compare
Choose a tag to compare

This is mainly fixes to InlineApprovals. But it does contain breaking changes for StringUtils.split().

Breaking changes

StringUtils.split(String, String) no longer trims by default. To maintain previous behavior, call StringUtils.split(String, String, true).
StringUtils.split() now takes a regex as the pattern instead of a simple string.

ParseInputs

26 Feb 19:04
d96b849
Compare
Choose a tag to compare

ParseInputs

You can now write tests like

@Test
void testWithTypesTransformersAndBoth()
{
  var expected = """
      1 -> 1
      9 -> 1001
      """;
  ParseInput.from(expected)
    .withTypes(Integer.class)
    .verifyAll(Integer::toBinaryString);
}

Minor enhancements

  • Queryable.of(List) - this is an alias of Queryable.as for consistency with List.of
  • Approvals.verifyAll(List, Formatter) - already had this for arrays but not lists

Updating dependency to jakarta mail

07 Dec 23:16
Compare
Choose a tag to compare

Inline reporter detects expected

21 Nov 16:35
Compare
Choose a tag to compare

Fixes a minor bug where you have code before expected for inline approvals

InlineJavaReporter uses tab/spaces

20 Nov 19:15
Compare
Choose a tag to compare
22.3.1

d updated markdown snippets