tracked-tools / ember-could-get-used-to-this

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plain functions as helpers fail with hash params in ember > 4.5, due to test in ember-could-get-used-to-this

johanrd opened this issue · comments

  1. Clone this repo: https://github.com/johanrd/plain-functions-as-helpers-with-hash-params

See that the repo fails with the following error after installing ember-mobile-menu:

Error: Assertion Failed: Functional helpers cannot receive hash parameters. `substring` received start, end

This error comes from the substring function in the official ember guides on functions with hash params, where the message itself stems from ember-could-get-used-to-this:

assert.equal(e.message, 'Assertion Failed: Functional helpers cannot receive hash parameters. `add` received first,second');

Is there any way to bypass this test in ember-could-get-used-to-this? According to the readme:

As of Ember 4.5, this feature is now built into Ember, and includes both positional and named arguments.

I've also posted this in nickschot/ember-mobile-menu#771, as I'm not sure whether this could be fixed by a config there, or needs to be fixed here.

Thanks,