Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing bound handlebars helpers #5

Closed
manuelmitasch opened this issue Feb 28, 2014 · 14 comments
Closed

Testing bound handlebars helpers #5

manuelmitasch opened this issue Feb 28, 2014 · 14 comments

Comments

@manuelmitasch
Copy link

Opening this issue following stefanpenner/ember-test-helpers#3.

It would be great to have a test helper or at least an example how to (unit) test a bound handlebars helper.

Thanks!

@ryanflorence
Copy link
Contributor

I've been considering a moduleForSnippet(templateString), and you could test your helpers the same way you use them.

moduleForSnippet("{{datetime due}}")
test("datetime", function() {
  var context = this.subject({
    due: Date.now()
  })
  // ...

@manuelmitasch
Copy link
Author

That looks fantastic!

@coderberry
Copy link

👍

@zeppelin
Copy link

🍺

@tonycoco
Copy link

tonycoco commented May 8, 2014

Any movement on this? Has anyone figured out a good way to test these with ES6 modules? ...I'm using the EAK/CLI.

@taras
Copy link

taras commented May 8, 2014

👍

@cbliard
Copy link

cbliard commented May 20, 2014

Pull request #11 looks good. Why could it not be merged?

@coderberry
Copy link

\cc @rpflorence

@chrisgame
Copy link

@crismali
Copy link

Is this going to be pulled into master any time soon?

@zhangyuhui
Copy link

what is the progress of moduleForSnippet? I did not see any update.

@thecristen
Copy link

👍

@taras
Copy link

taras commented Aug 14, 2015

moduleForSnippet is now basically moduleForComponent('some-component', { integration: true }). There is actually nothing specific to a component there. You can create an arbitrary template and use it.

@rwjblue
Copy link
Member

rwjblue commented Aug 14, 2015

Confirm.

@rwjblue rwjblue closed this as completed Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests