Today I Learned

hashrocket A Hashrocket project

Can't find variable: Symbol

Have you ever had an Ember CLI test that passes in Chrome but not in Phantom? Of course you have.

Did it have an error that looks something like this?

✘ ReferenceError: Can't find variable: Symbol

ReferenceError: Can't find variable: Symbol

Don't (╯°□°)╯︵ ʇno dıןɟ ! You just have to enable the Babel Symbol polyfill.

// ember-cli-build.js
...
var app = new EmberApp(defaults, {
  babel: {
    optional: ['es6.spec.symbols'],
    includePolyfill: true
  }
});

Lemme fix that for you (ヘ・_・)ヘ┳━┳

All green!

See More #emberjs TILs