# Ist es möglich, das Site-Objekt mit einer eigenen Fixture während Front-End-Tests eines Plugins zu überschreiben?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-override-the-site-object-with-own-fixture-during-front-end-tests-of-a-plugin/249167>\
**Category:** Development\
**Created:** [16. Dezember 2022 um 18:32 UTC](https://meta.discourse.org/t/is-it-possible-to-override-the-site-object-with-own-fixture-during-front-end-tests-of-a-plugin/249167 "2022-12-16T18:32:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [28. Dezember 2022 um 21:57 UTC](https://meta.discourse.org/t/is-it-possible-to-override-the-site-object-with-own-fixture-during-front-end-tests-of-a-plugin/249167/3 "2022-12-28T21:57:56Z")

</div>

Ich habe das endlich gelöst. Es stellte sich heraus, dass man `needs` genauso verwenden kann wie für andere Objekte:

Hinweis hier:

> <https://github.com/discourse/discourse/blob/953b823c5a134d247cade81fc4f2b79e4326ea31/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js#L359>

Finaler Code:

```plaintext
  needs.site(cloneJSON(siteFixtures["country_codes.json"]));

```

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-override-the-site-object-with-own-fixture-during-front-end-tests-of-a-plugin/249167)._
