How to test String.prototype.includes in PhantomJS
问题 I have an ember-cli 0.2.7 using Ember.js 1.12.0 app with a piece of code that looks like: controllers/cart.js import Ember from 'ember'; export default Ember.Controller.extend({ footwearInCart: Ember.computed('model.@each.category', function() { return this.get('model').any(product => product.get('category').includes('Footwear')); }) }); It goes through all the objects in the model and returns true if their category property has 'footwear' in it. I'm trying to test it like so: tests/unit