toranb / ember-template-compiler

An npm module for the ember-template-compiler.js file that ships with ember.js
MIT License
30 stars 23 forks source link

Test "compiles down a handlebars template to a string" fails #12

Closed andyhot closed 10 years ago

andyhot commented 10 years ago
$ npm test

> ember-template-compiler@1.4.0-beta.1 test /home/andyhot/projects/js/ember-template-compiler
> ./node_modules/jasmine-node/bin/jasmine-node tests/

...F

Failures:

  1) ember-template-compiler tests compiles down a handlebars template to a string when asObject=false
   Message:
     Expected 'function' to be 'string'.
   Stacktrace:
     Error: Expected 'function' to be 'string'.
    at null.<anonymous> (/home/andyhot/projects/js/ember-template-compiler/tests/main.spec.js:26:28)

Finished in 0.035 seconds
4 tests, 4 assertions, 1 failure, 0 skipped

I also don't get how the tests call precompile with a second argument when Ember.Handlebars.precompile in vendor/ember-template-compiler.js only uses one argument... perhaps tests are out of sync?

rwjblue commented 10 years ago

Good catch! Thank you for reporting.

The issue is that we merged https://github.com/toranb/ember-template-compiler/pull/11, but it needed to be pushed upstream. The next time I updated the vendored template compiler the tests no longer work properly.

We need to remove the tests added in #11. Care to submit a PR?