# Importing a model or component from a plugin into a custom plugin: tests fail

**URL:** https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005
**Category:** Development
**Tags:** testing
**Created:** [September 17, 2025, 4:55pm UTC](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005 "2025-09-17T16:55:32Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 26, 2025, 11:00am UTC](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005/4 "2025-09-26T11:00:50Z")

</div>

When you test a plugin in qunit, we only load the JS for that specific plugin. That helps to avoid surprise issues when multiple plugins interact with each other. It also helps to ensure that a plugin doesn’t unexpectedly become dependent on another.

In your case, it sounds like the interaction is deliberate, and you always expect your users to have discourse-calendar enabled. In that case, you can add some config to an `about.json` file which will make the discourse-calendar JS available in the tests of your own plugin. Here’s an example:

> <https://github.com/discourse/discourse-prometheus-alert-receiver/blob/main/about.json>

^^ in this case it’s adding `discourse-assign`. For your case, you would make it `discourse-calendar`

---

_[View the full topic](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005)._
