<commit_before>'use strict';

const should = require('should');
const testHelper = require('./test-helper');

const priceFinder = testHelper.priceFinder;
const verifyPrice = testHelper.verifyPrice;
const verifyItemDetails = testHelper.verifyItemDetails;

describe('price-finder for Snapdeal Store URIs', () => {
  describe('testing item', () => {
    const uri = 'http://www.snapdeal.com/product/iphone-6s-16gb/663413326062';

    it('should respond with a price for findItemPrice()', (done) => {
      priceFinder.findItemPrice(uri, (err, price) => {
        should(err).be.null();
        verifyPrice(price);
        done();
      });
    });

    it('should respond with a price, and the right category and name for findItemDetails()', (done) => {
      priceFinder.findItemDetails(uri, (err, itemDetails) => {
        should(err).be.null();
        verifyItemDetails(itemDetails, 'iPhone 6s (16GB)', 'Mobile Phones');
        done();
      });
    });
  });
});<commit_msg>Fix Snapdeal e2e test<commit_after>'use strict';

const should = require('should');
const testHelper = require('./test-helper');

const priceFinder = testHelper.priceFinder;
const verifyPrice = testHelper.verifyPrice;
const verifyItemDetails = testHelper.verifyItemDetails;

describe('price-finder for Snapdeal Store URIs', () => {
  describe('testing item', () => {
    const uri = 'https://www.snapdeal.com/product/apple-iphone-7-32gb-gold/626098478748';

    it('should respond with a price for findItemPrice()', (done) => {
      priceFinder.findItemPrice(uri, (err, price) => {
        should(err).be.null();
        verifyPrice(price);
        done();
      });
    });

    it('should respond with a price, and the right category and name for findItemDetails()', (done) => {
      priceFinder.findItemDetails(uri, (err, itemDetails) => {
        should(err).be.null();
        verifyItemDetails(itemDetails, '\n   \t\t\tApple iPhone 7 32GB', 'Mobile Phones');
        done();
      });
    });
  });
});
{'fraction_non_alphanumeric': 0.15903371917463513, 'fraction_numerical': 0.018621036738802214, 'mean_word_length': 3.497737556561086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, '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': '947115', 'n_tokens_mistral': 624, 'n_tokens_neox': 594, 'n_words': 137}