Code Monkey home page Code Monkey logo

Comments (10)

stephencelis avatar stephencelis commented on July 30, 2024 2

Thanks for reporting the issue (and PR, which I'll look at shortly)! Re: your suggestions:

  1. Allow to look in Bundle resources for the snapshot file
  2. Allow a run-time file search to find the path of the snapshot

Either of these sound like viable solutions, though we wanna think over the ramifications a bit.

Why there is StaticString for file parameter in assertSnapshot instead of String?

I think this is an oversight that we can fix.

from swift-snapshot-testing.

vox-humana avatar vox-humana commented on July 30, 2024

It could be environment variables like IMAGE_DIFF_DIR and FB_REFERENCE_IMAGE_DIR in iOSSnapshotTestCase.

from swift-snapshot-testing.

vox-humana avatar vox-humana commented on July 30, 2024

And just one small related question. Why there is StaticString for file parameter in assertSnapshot instead of String? So there is no way to pass a run-time requested string even from the caller's side.

from swift-snapshot-testing.

stephencelis avatar stephencelis commented on July 30, 2024

@vox-humana Unfortunately file needs to be passed to XCTFail as a StaticString, so this interface can't be changed.

from swift-snapshot-testing.

vox-humana avatar vox-humana commented on July 30, 2024

@stephencelis Oh, I see, it is sad. Thank you.

from swift-snapshot-testing.

ccarpita avatar ccarpita commented on July 30, 2024

With the #file macro changing its output in a future release of Swift (perhaps 5.4?), what's the plan to address storage paths? Having a standard ENV variable would at least be helpful to prevent general chaos over the #file -> #filePath transition

from swift-snapshot-testing.

 avatar commented on July 30, 2024

Good afternoon, any news one this ?

from swift-snapshot-testing.

omar-delphia avatar omar-delphia commented on July 30, 2024

Xcode Cloud also runs the tests on a different machine to the build machine, so this suggestion would help there too. I'm currently using the technique discussed in this thread (#553) to make the snapshots accessible to the tests, but having the library support this case natively would be a cool addition!

from swift-snapshot-testing.

 avatar commented on July 30, 2024

Any news on this? @stephencelis

from swift-snapshot-testing.

 avatar commented on July 30, 2024

Any news regarding this?

from swift-snapshot-testing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.