Closed ynnckcmprnl closed 6 months ago
Weird enough, I have a few #Previews with spaces in the name for which Prefire doesn't generate any code at all.
@ynnckcmprnl Thanks for starting the issue! I posted a new version with a fix for this: https://github.com/BarredEwe/Prefire/releases/tag/2.3.0
I tried with the 2.3.0 release. But it's not generating test code for all my #Preview's, something I encountered with previous versions too. I can't quite put my finger on it why, but I'm missing snapshots of previews and can't seem to trigger the generation of the test code in PreviewTests.generated.
I tried with the 2.3.0 release. But it's not generating test code for all my #Preview's, something I encountered with previous versions too. I can't quite put my finger on it why, but I'm missing snapshots of previews and can't seem to trigger the generation of the test code in PreviewTests.generated.
I figured out what the problem was. I'll need some time to fix it.
I tried with the 2.3.0 release. But it's not generating test code for all my #Preview's, something I encountered with previous versions too. I can't quite put my finger on it why, but I'm missing snapshots of previews and can't seem to trigger the generation of the test code in PreviewTests.generated.
I managed to fix this. You can already try the fix in the new release: https://github.com/BarredEwe/Prefire/releases/tag/2.4.0
I tried with the 2.3.0 release. But it's not generating test code for all my #Preview's, something I encountered with previous versions too. I can't quite put my finger on it why, but I'm missing snapshots of previews and can't seem to trigger the generation of the test code in PreviewTests.generated.
I am facing the same issue. No generated tests for #Preview.
Default PreviewProvider works fine.
Update: It is indeed fixed with 2.4.0
I am closing the issue, as the problem has been solved ✅
Context 🕵️♀️
I'm integrating Prefire 2.2.1 in a SwiftUI Design System package.
What 🌱
A space in the preview name isn't escaped or replaced with an underscore, causing compile errors in the generated code. Compile error: Found an unexpected second identifier in function declaration; is there an accidental break?
Example:
Generates: