Sha256: 37f9b185969c5641830cfad4e2915501bf5f2b6455796df77efc07857d982435

Contents?: true

Size: 685 Bytes

Versions: 3

Compression:

Stored size: 685 Bytes

Contents

import EmberObject from '../../../lib/system/object';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';

moduleFor(
  'strict mode tests',
  class extends AbstractTestCase {
    ['@test __superWrapper does not throw errors in strict mode'](assert) {
      let Foo = EmberObject.extend({
        blah() {
          return 'foo';
        },
      });

      let Bar = Foo.extend({
        blah() {
          return 'bar';
        },

        callBlah() {
          let blah = this.blah;

          return blah();
        },
      });

      let bar = Bar.create();

      assert.equal(bar.callBlah(), 'bar', 'can call local function without call/apply');
    }
  }
);

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/object/strict-mode-test.js
discourse-ember-source-3.5.1.1 dist/es/ember-runtime/tests/system/object/strict-mode-test.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-runtime/tests/system/object/strict-mode-test.js