<commit_before>'use strict';

var td              = require('testdouble');
var expect          = require('../../../helpers/expect');
var mockProject     = require('../../../fixtures/ember-cordova-mock/project');
var ValidateLocType = require('../../../../lib/tasks/validate/location-type');

describe('Validate Location Type', function() {
  var validateLoc;

  beforeEach(function() {
    validateLoc = new ValidateLocType({
      project: mockProject.project,
      ui: mockProject.ui,
    });
  });

  afterEach(function() {
    td.reset();
  });

  it('rejects when config.locationType is not hash', function() {
    var config = { locationType: 'auto' };
    expect(validateLoc.run(config)).to.be.rejected;
  });

  it('throws an error with config.locationType is blank', function() {
    var config = {};
    expect(validateLoc.run(config)).to.be.rejected;
  });

  it('resolves if config.locationType is hash', function() {
    var config = { locationType: 'hash' };
    expect(validateLoc.run(config)).to.be.fulfilled;
  });
});<commit_msg>fix(location-type-test): Chai promise expectations need to be returned<commit_after>'use strict';

var td              = require('testdouble');
var expect          = require('../../../helpers/expect');
var mockProject     = require('../../../fixtures/ember-cordova-mock/project');
var ValidateLocType = require('../../../../lib/tasks/validate/location-type');

describe('Validate Location Type', function() {
  var validateLoc;

  beforeEach(function() {
    validateLoc = new ValidateLocType({
      project: mockProject.project,
      ui: mockProject.ui,
    });
  });

  afterEach(function() {
    td.reset();
  });

  it('rejects when config.locationType is not hash', function() {
    var config = { locationType: 'auto' };
    return expect(validateLoc.run(config)).to.be.rejected;
  });

  it('throws an error with config.locationType is blank', function() {
    var config = {};
    return expect(validateLoc.run(config)).to.be.rejected;
  });

  it('resolves if config.locationType is hash', function() {
    var config = { locationType: 'hash' };
    return expect(validateLoc.run(config)).to.be.fulfilled;
  });
});
{'fraction_non_alphanumeric': 0.17525298988040477, 'fraction_numerical': 0.0, 'mean_word_length': 3.2563600782778863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2975617', 'n_tokens_mistral': 637, 'n_tokens_neox': 632, 'n_words': 138}