<commit_before>/**
 * Frisby spec tests for the MathML Cloud API.
 *
 * TODO:
 * - set up independent test data
 * - test variety of output formats
 * - test failure conditions
 */
// With Frisby installed globally, we need the full path to find it
var frisby = require('/usr/local/lib/node_modules/frisby');
var fs = require('fs');
var path = require('path');
var FormData = require('form-data');

// Local testing
//var base_url = 'http://localhost:1337';
// Server testing
var base_url = 'https://api.staging.mathmlcloud.org';
//var base_url = 'http://172.16.31.10'; // mathmlcloud.azure-api.net

// This is the key for <EMAIL>
var subscription_key = '<KEY>';

// Live data
var equation_id = '54946d0b96934481106fd7df';
var component_id = '54946d1196934481106fd7e3';
var html5_id = '54947d4923c316bf1e662a48';

describe("MathML Cloud API features", function() {
	// Global setup for all tests
	frisby.globalSetup({
	  request: {
	    headers:{'Accept': 'application/json'},
	    inspectOnFailure: true
	  }
	});

	//---- GET /component/{id}<commit_msg>MMLC-161: Use the API key for the qa user.<commit_after>/**
 * Frisby spec tests for the MathML Cloud API.
 *
 * TODO:
 * - set up independent test data
 * - test variety of output formats
 * - test failure conditions
 */
// With Frisby installed globally, we need the full path to find it
var frisby = require('/usr/local/lib/node_modules/frisby');
var fs = require('fs');
var path = require('path');
var FormData = require('form-data');

// Local testing
//var base_url = 'http://localhost:1337';
// Server testing
var base_url = 'https://api.staging.mathmlcloud.org';
//var base_url = 'http://172.16.31.10'; // mathmlcloud.azure-api.net

// This is the key for <EMAIL>
var subscription_key = '<KEY>';

// Live data
var equation_id = '54946d0b96934481106fd7df';
var component_id = '54946d1196934481106fd7e3';
var html5_id = '54947d4923c316bf1e662a48';

describe("MathML Cloud API features", function() {
	// Global setup for all tests
	frisby.globalSetup({
	  request: {
	    headers:{'Accept': 'application/json'},
	    inspectOnFailure: true
	  }
	});

	//---- GET /component/{id}
{'fraction_non_alphanumeric': 0.14726507713884993, 'fraction_numerical': 0.06685366993922394, 'mean_word_length': 3.7874720357941833, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7524150', 'n_tokens_mistral': 805, 'n_tokens_neox': 717, 'n_words': 205}