Skip to content

dmuenz/snapviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📷 SnapViewer

SnapViewer is a simple web app for viewing testthat snapshots in an R package. You point the app to the package's snapshot folder on your computer and it shows a list of all snapshot files, e.g. .md files created via expect_snapshot() and .svg files created via vdiffr::expect_doppelganger(). Select any file to view it.

You can point SnapViewer to the snapshot folders for multiple packages, and easily toggle between them. SnapViewer remembers all previously accessed folders across browsing sessions. These features rely an experimental JavaScript method (showDirectoryPicker) which is implemented in Chrome and Edge but not in Firefox or Safari. So use Chrome or Edge for best compatibility.

If your R package is named package, then the snapshot folder (if it exists) is package/tests/testthat/_snaps. You can equivalently point SnapViewer to any of the following folders, and in any case it will find the _snaps folder: package, package/tests, package/tests/testthat, package/tests/testthat/_snaps. Selecting the root package folder is best because then SnapViewer knows the package name and suggests this as a nickname for labeling the snapshot folder within the app. Otherwise you can type in your own nickname.

About

Web app for viewing testthat snapshots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors