Question about testing plugin.ts #41
Unanswered
henry-wu-1130
asked this question in
Q&A
Replies: 1 comment
-
The boilerplate didn't focus on testing the implementation of the plugin, just putting some testing setup in place. But as said, there's no way to test the real implementation of the plugin since it tuns inside a Figma worker (which injects the TL;DR: yes, you need to mock the (Sorry for the delay, I totally missed this notification) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
really thanks for this boilerplate.
but i also have some questions here that i'm curious about how to test function in plugin.ts file?
i have trying to use jest in my project but when running, it showing that " ReferenceError: figma is not defined".
i found that in this project. you only test for build script. what's the reason? and if i want to test plugin.ts, should i mock figma object and it's corresponding properties. or is there any better way to do this?
thanks, and have a nice day
Beta Was this translation helpful? Give feedback.
All reactions