https://kotlinlang.org logo
#kvision
Title
# kvision
j

João Paulo Figueira

07/19/2022, 9:15 AM
Do we have any pointers on how to run frontend tests with KVision?
r

Robert Jaros

07/19/2022, 9:18 AM
kvision realworld example apps have some basic frontend tests
j

João Paulo Figueira

07/19/2022, 9:31 AM
When I run the frontend tests, I get this:
ENOENT: no such file or directory, open '/var/folders/q1/pwwyp7y96370s3j_7487q790w6vllt/T/_karma_webpack_267428/7ff3ca6fa798de3f8ac2.woff?08efbba7c53d8c5413793eecb19b20bb'
Do you have any idea of what I might be missing?
r

Robert Jaros

07/19/2022, 9:32 AM
do you have frontend-only or fullstack application?
j

João Paulo Figueira

07/19/2022, 9:35 AM
Fullstack
r

Robert Jaros

07/19/2022, 12:26 PM
I've upgraded my example fullstack app to the latest KVision version and frontend tests work fine for me.
Could you share your project or at least some test code?
j

João Paulo Figueira

07/19/2022, 12:27 PM
I will do so in a while.
This is the build file.
The settings file:
What else should I share with you?
Thank you for taking the time to look at this.
I upgraded to 5.13.1 and still got the same result.
r

Robert Jaros

07/19/2022, 4:18 PM
Do you use IR or legacy compiler?
Could you share some of yours testing code?
I think I've reproduced the problem with legacy compiler.
It seems to me the
kvision-bootstrap-icons
module is problematic.
Removing
BootstrapIconsModule
initializer from the
startApplication
function fixes the problem for me.
It's probably related to this: https://github.com/twbs/icons/issues/944
I have found a workaround which works for me. Please try adding to your project
karma.config.d
directory with
karma.conf.js
file containing the line:
Copy code
config.webpack.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/inline'});
j

João Paulo Figueira

07/19/2022, 5:32 PM
Doing it!
You are THE MAN!!!
Where can I learn more about these issues?
The testing is now working. Thanks a lot for this!
r

Robert Jaros

07/19/2022, 5:35 PM
Google 😜
j

João Paulo Figueira

07/19/2022, 5:36 PM
😎
3 Views