Skip to content

Commit 8ec1600

Browse files
committed
Speed up snapshots test
Using pp does extra work that doesn't seem to do much of anything. This brings `SnapshotsTest` runtime down to 8 from 10 seconds for me Creating inspect output still dominates the total runtime
1 parent 1da0733 commit 8ec1600

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/prism/snapshots_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def assert_snapshot(fixture, version)
4848
result = Prism.parse(source, filepath: fixture.path, version: version)
4949
assert result.success?
5050

51-
printed = PP.pp(result.value, +"", 79)
51+
printed = result.value.inspect
5252
snapshot = fixture.snapshot_path
5353

5454
if File.exist?(snapshot)

0 commit comments

Comments
 (0)