Skip to content

Commit

Permalink
only gsub if test is character
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Dec 12, 2024
1 parent dbe8883 commit 3dff219
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/snapshot-reporter.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ SnapshotReporter <- R6::R6Class("SnapshotReporter",
},

start_test = function(context, test) {
self$test <- gsub("\n", "", test)
if (is.character(self$test)) {
self$test <- gsub("\n", "", test)
}
},

# Called by expectation
Expand Down

0 comments on commit 3dff219

Please sign in to comment.