Sha256: 230868a2db6ec124fd39271c5700029f309a820fe5d53fbf5de97480c119366c

Contents?: true

Size: 509 Bytes

Versions: 3

Compression:

Stored size: 509 Bytes

Contents

import { AbstractTestCase } from 'internal-test-helpers';
import { runArrayTests } from '../helpers/array';

class MapByTests extends AbstractTestCase {
  '@test get value of each property'() {
    let obj = this.newObject([{ a: 1 }, { a: 2 }]);
    this.assert.equal(obj.mapBy('a').join(''), '12');
  }

  '@test should work also through getEach alias'() {
    let obj = this.newObject([{ a: 1 }, { a: 2 }]);
    this.assert.equal(obj.getEach('a').join(''), '12');
  }
}

runArrayTests('mapBy', MapByTests);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/es/@ember/-internals/runtime/tests/array/mapBy-test.js
discourse-ember-source-3.5.1.1 dist/es/ember-runtime/tests/array/mapBy-test.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-runtime/tests/array/mapBy-test.js