Sha256: d752bc135e08e480ed09d20d27153d3d49c8a652468e5eafa3dae0b63dc6936b

Contents?: true

Size: 596 Bytes

Versions: 2

Compression:

Stored size: 596 Bytes

Contents

import { OWNER, getOwner, setOwner } from 'ember-owner';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';

moduleFor(
  'Owner',
  class extends AbstractTestCase {
    ['@test An owner can be set with `setOwner` and retrieved with `getOwner`'](assert) {
      let owner = {};
      let obj = {};

      assert.strictEqual(getOwner(obj), undefined, 'owner has not been set');

      setOwner(obj, owner);

      assert.strictEqual(getOwner(obj), owner, 'owner has been set');

      assert.strictEqual(obj[OWNER], owner, 'owner has been set to the OWNER symbol');
    }
  }
);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
discourse-ember-source-3.5.1.1 dist/es/container/tests/owner_test.js
discourse-ember-source-3.5.1.0 dist/dist/es/container/tests/owner_test.js