Sha256: a3f08b5a9101417b59c496fb3fba1cc64630d283271bd6c84447e86b368851a7

Contents?: true

Size: 588 Bytes

Versions: 3

Compression:

Stored size: 588 Bytes

Contents

import { A } from '../../../lib/mixins/array';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';

moduleFor(
  'NativeArray.replace',
  class extends AbstractTestCase {
    ['@test raises assertion if third argument is not an array']() {
      expectAssertion(function() {
        A([1, 2, 3]).replace(1, 1, '');
      }, 'The third argument to replace needs to be an array.');
    }

    ['@test it does not raise an assertion if third parameter is not passed'](assert) {
      assert.deepEqual(A([1, 2, 3]).replace(1, 2), A([1]), 'no assertion raised');
    }
  }
);

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/system/native_array/replace_test.js
discourse-ember-source-3.5.1.1 dist/es/ember-runtime/tests/system/native_array/replace_test.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-runtime/tests/system/native_array/replace_test.js