# How to mock css that is loaded via html require when testing components

**URL:** <https://discourse.aurelia.io/t/how-to-mock-css-that-is-loaded-via-html-require-when-testing-components/1642>\
**Category:** Help Requests\
**Created:** [September 14, 2018, 9:41pm UTC](https://discourse.aurelia.io/t/how-to-mock-css-that-is-loaded-via-html-require-when-testing-components/1642 "2018-09-14T21:41:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevies](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/stevies/32/1039_2.png) [@stevies](https://discourse.aurelia.io/u/stevies)\
**Post date:** [September 15, 2018, 1:03am UTC](https://discourse.aurelia.io/t/how-to-mock-css-that-is-loaded-via-html-require-when-testing-components/1642/2 "2018-09-15T01:03:31Z")

</div>

If you are using Jest, you should be able to do this:

> **[Using with webpack · Jest](https://jestjs.io/docs/en/webpack#handling-static-assets)**
>
> Jest can be used in projects that use webpack to manage assets, styles, and compilation. webpack does offer some unique challenges over other tools because it integrates directly with your application...

That works for me for plain .css files.

But I have not been able to get it to work .scss files directly. Anyone solved that?

Found an open bug ticket at:

> <https://github.com/aurelia/testing/issues/67>

---

_[View the full topic](https://discourse.aurelia.io/t/how-to-mock-css-that-is-loaded-via-html-require-when-testing-components/1642)._
