Releases: approvals/ApprovalTests.Java
Fixed JSON array ordering when using JsonApprovals
DateScrubber enhancements
new factory methods to get DateScrubbers for sql.Date, util.Date and Timestamp
DateScrubber can handle Timestamp's toString()
Verify Map works with keys that are not comparable
Added FileUtils.getResolvedPath()
When working with the file ./name.txt:
getAbsolutePath() will resolve this to /path/to/./name.txt
instead of the desired /path/to/name.txt.
getResolvedPath() solves this problem.
Python scripts for remove_abandoned_files and approve_all
Also, temp folder works when running tests in multi-threaded mode
ReadBuffer input no longer modifies newlines or adds them at the end
Also:
Added StringUtils.ensureEnding
Added FileUtils.readFile(file, ensureTrailingNewline = true)
Closes #637
Automatically git-ignore our temp folder
Just like ApprovalTests.Python, we now write a .gitignore file into our temp directory, thus consumers of the library don't have to add the folder themselves to their project's gitignore.
Once.runAsync
Once now supports running tasks asynchronously.
Bugfix
Downloading the approve_all script now is done asynchronously, meaning it won't affect build times.
Closes #615
Fixes problems with ReporterWithApprovalPower and FirstWorkingReporter
Allow configuration of project base directory
By default, Approvals uses the working directory to find the working directory and its children to find source file and store received and approved files. This is now configurable if your working directory no longer contains the source. You can do this by setting either the system property or system environment variable called APPROVALTESTS_PROJECT_DIRECTORY. Here is an example of doing this when running tests with maven on forks:
<systemPropertyVariables>
<APPROVALTESTS_PROJECT_DIRECTORY>${project.basedir}</APPROVALTESTS_PROJECT_DIRECTORY>
</systemPropertyVariables>Reported in #608
Also fixes #612