Sha256: 6231812c7f0d2e36512dbb5ceff105a451e037cef5be13c6cd7abee6468cdc4c

Contents?: true

Size: 831 Bytes

Versions: 3

Compression:

Stored size: 831 Bytes

Contents

import { isNone } from '..';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';

moduleFor(
  'isNone',
  class extends AbstractTestCase {
    ['@test isNone'](assert) {
      let string = 'string';
      let fn = function() {};

      assert.equal(true, isNone(null), 'for null');
      assert.equal(true, isNone(undefined), 'for undefined');
      assert.equal(false, isNone(''), 'for an empty String');
      assert.equal(false, isNone(true), 'for true');
      assert.equal(false, isNone(false), 'for false');
      assert.equal(false, isNone(string), 'for a String');
      assert.equal(false, isNone(fn), 'for a Function');
      assert.equal(false, isNone(0), 'for 0');
      assert.equal(false, isNone([]), 'for an empty Array');
      assert.equal(false, isNone({}), 'for an empty Object');
    }
  }
);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/es/@ember/-internals/metal/tests/is_none_test.js
discourse-ember-source-3.5.1.1 dist/es/ember-metal/tests/is_none_test.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-metal/tests/is_none_test.js