5

I got the following error while running a test with Ember.js:

Promise rejected before "...": Assertion Failed: fullName must be a proper full name

What is the meaning of this error?

Ahmet Emre Kilinc
  • 5,489
  • 12
  • 30
  • 42

4 Answers4

10

You might also encounter this error if you are using the new nested subfolder angle bracket syntax: <Foo::Bar />

Make sure you have the latest version of ember-angle-bracket-invocation-polyfill, at least 1.3.0

dwenzel
  • 1,404
  • 9
  • 15
3

Reason

This error is thrown if moduleForComponent is used for a unit test and the first parameter(the name of the component) is started with component: prefix.

How to solve

You should check the name of the component that is written as parameter for unit test. If moduleForComponent is used, then component: prefix should not be used. However if moduleFor is used, then component: prefix should be used like below examples:

moduleForComponent('my-component', 'unit: my-component', {
  //test specifications
});

or

moduleFor('component:my-component', 'unit: my-component', {
  //test specifications
});

This twiddle demonstrates usages of both examples.

Ahmet Emre Kilinc
  • 5,489
  • 12
  • 30
  • 42
2

You will also see this horrible message with a malformed route name such as the following:

Router.map(function () {
  this.route('mock-test/:accountId/:companyId');
  return null;
});

where you have confused the route name with a path segment. Fix it like this:

Router.map(function () {
  this.route('mock-test', {
    path: 'mock-test/:accountId/:companyId',
  });
  return null;
});
Artzt
  • 51
  • 3
2

I got the same confusing error after using one colon instead of 2 to separate component name and sub-component.

<Component:SubComponent /> instead of <Component::SubComponent />