pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.

Home Page:https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compared to vitest snapshot testing of json swift-snapshot-testing is slow

doozMen opened this issue · comments

I realise this is not a very good description I it is more a question if you have an idea why a simple json rendering test is slow compared to vtest doing the same thing?

Any idea how to speed up snapshot tests compared to a test with a hardcoded string value?

For example in my tests a test like below tripled in duration when converted to snapshots

func testEncode() {
  let sut = try JSONEncoder().encode(Foo.self)

  let expected = """
  {
  ...
  }
  """
  XCAssertEqual(sut, expected)

Hi @doozMen, since this is more of a question than an issue I am going to convert it over to a GitHub discussion.