Skip to content

Recognizer missing in unit test #116

@daniellizik

Description

@daniellizik

package.json

ember-cli: 2.17.1
ember-cli-babel: 6.8.1
ember-gestures: 1.1.0
embrer-hammertime: 1.5.0

I installed the package with ember install ember-gestures, then added recognizers: 'swipe' to my component as well as a swipeLeft method. The behavior works fine in development, but when I try to unit test the component I get this error:

ember-gestures/recognizers/swipe was not found. You can scaffold this recognizer with 'ember g recognizer swipe'

Same thing happens if I use ember generator to generate a swipe recognizer using the config in this repo:

export default {
  include: [],
  exclude: [],
  options: { threshold: 25, direction: typeof Hammer === 'undefined' ? '' : Hammer.DIRECTION_HORIZONTAL },
  recognizer: 'swipe'
};

Do I need to do any more special component setup in my unit test outside of the setupComponentTest block?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions