<commit_before>import { test, module } from 'qunit';
import moment from 'moment';
import Ember from 'ember';

module('Unit | moment exports');

test('moment exports', (assert) => {
  assert.ok(moment, 'moment exports an object');
});

test('moment compare fn exists', (assert) => {
  const instance = moment();

  assert.equal(typeof instance.compare, 'function');
});

test('moment compare functions property', (assert) => {
  const instanceA = moment(0);
  const instanceB = moment(10000);
  const instanceC = moment(10000);

  assert.equal(instanceA.compare(instanceA, instanceB), -1);
  assert.equal(instanceB.compare(instanceB, instanceC), 0);
  assert.equal(instanceB.compare(instanceB, instanceA), 1);
});

test('moment tz fn exists', (assert) => {
  assert.equal(typeof moment.tz, 'function');
});

test('moment getLocale for `es`', (assert) => {
  assert.equal(typeof moment.localeData('es'), 'object');
});<commit_msg>Adding test for instanceof moment<commit_after>import { test, module } from 'qunit';
import moment from 'moment';
import Ember from 'ember';

module('Unit | moment exports');

test('moment exports', (assert) => {
  assert.ok(moment, 'moment exports an object');
});

test('moment compare fn exists', (assert) => {
  const instance = moment();

  assert.equal(typeof instance.compare, 'function');
});

test('moment() instanceof moment', (assert) => {
  assert.equal(moment() instanceof moment, true);
});

test('moment compare functions property', (assert) => {
  const instanceA = moment(0);
  const instanceB = moment(10000);
  const instanceC = moment(10000);

  assert.equal(instanceA.compare(instanceA, instanceB), -1);
  assert.equal(instanceB.compare(instanceB, instanceC), 0);
  assert.equal(instanceB.compare(instanceB, instanceA), 1);
});

test('moment tz fn exists', (assert) => {
  assert.equal(typeof moment.tz, 'function');
});

test('moment getLocale for `es`', (assert) => {
  assert.equal(typeof moment.localeData('es'), 'object');
});
{'fraction_non_alphanumeric': 0.17424242424242425, 'fraction_numerical': 0.014141414141414142, 'mean_word_length': 5.647651006711409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '116265', 'n_tokens_mistral': 617, 'n_tokens_neox': 589, 'n_words': 160}