question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

moduleForComponent fails "Unable to find partial with name"

See original GitHub issue

I have a component that named x-popover. Unit tests for x-popover fails because of this line in x-popover.hbs {{partial "todo-assign-dropdown"}}

It throws error: Died on test #2 at test (http://localhost:4200/assets/test-support.js:284:13) at eval (app/tests/unit/components/x-popover-test.js:13:5) at requireModule (http://localhost:4200/assets/vendor.js:77:29) at http://localhost:4200/assets/test-loader.js:14:29: Assertion Failed: Unable to find partial with name 'todo-assign-dropdown'.

todo-assign-dropdown is placed in templates folder with name -todo-assign-dropdown.hbs

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Nov 26, 2014

Basically the issue is that Ember is doing “weird” things for partials (it prepends an underscore). The following is hideous but will get you working for now:

import resolver from '../../helpers/resolver';

moduleForComponent('some-other-thing', 'component:some-other-thing', {
  needs: ['component:some-thing'],

  setup: function(container) {
    container.register('template:path/to/partial', resolver.resolve('template:path/to/-partial'));
  }
});

The factory that Ember (and ember-qunit) is looking for template:path/to/partial does not match the actual module path.

0reactions
jbolercommented, Oct 23, 2015

@rwjblue I’m getting Uncaught TypeError: this.container.register is not a function

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find partial in a component test - ember.js
I have a component test that is failing because it can't find a partial that the template is rendering. The specific error is...
Read more >
User {{partial}} with a teamplate in nested directory ... - Ember.JS
Uncaught Error: Assertion Failed : Unable to find partial with name 'fileB'. If I refer to a template which is directly below the...
Read more >
ember-qunit | Yarn - Package Manager
'assert' is undefined #142; Exporting QUnit.push #140; moduleForComponent fails "Unable to find partial with name" #110. Merged pull requests:.
Read more >
Source - GitHub
... "Unable to find partial with name" [\#202](https://github.com/emberjs/ember-qunit/issues/202) - needs fails with single-character underscore helper name ...
Read more >
ember-data-factory-guy - npm
get attributes for factory defined models with attributesFor ... So, for the model User , the factory name would be user; Create factory ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found