<commit_before>// Set appropriate fetch function for environment.
// Old browsers must use polyfill.

if (typeof window === "undefined") {
    fetch = require("node-fetch");
}

describe("ArmCalc test", () => {
    let rootUrl = "http://webapps.wsdot.loc/StateRoute/LocationReferencingMethod/Transformation/ARMCalc/ArmCalcService.svc/REST";
    // TODO: Remove this line once API is in production.
    rootUrl = rootUrl.replace(/webapps/, "webappsqa");
    let calcSrmpUrl = `${rootUrl}/CalcSrmp?sr=005&arm=150&ref=20140819&resp=20140819`;
    let calcArmUrl = `${rootUrl}/CalcArm?sr=005&srmp=150&ref=20140819&resp=20140819`;
    let batchUrl = `${rootUrl}/CalcBatch`;

    it("should be able to calculate SRMP", done => {
        let calcSrmpPromise = fetch(calcSrmpUrl).then((result) => {
            return result.json();
        });
        calcSrmpPromise.then(result => {
            expect(typeof result === "object").toBe(true);
            done();<commit_msg>Removed QA URL replacement code<commit_after>// Set appropriate fetch function for environment.
// Old browsers must use polyfill.

if (typeof window === "undefined") {
    fetch = require("node-fetch");
}

describe("ArmCalc test", () => {
    let rootUrl = "http://webapps.wsdot.loc/StateRoute/LocationReferencingMethod/Transformation/ARMCalc/ArmCalcService.svc/REST";
    let calcSrmpUrl = `${rootUrl}/CalcSrmp?sr=005&arm=150&ref=20140819&resp=20140819`;
    let calcArmUrl = `${rootUrl}/CalcArm?sr=005&srmp=150&ref=20140819&resp=20140819`;
    let batchUrl = `${rootUrl}/CalcBatch`;

    it("should be able to calculate SRMP", done => {
        let calcSrmpPromise = fetch(calcSrmpUrl).then((result) => {
            return result.json();
        });
        calcSrmpPromise.then(result => {
            expect(typeof result === "object").toBe(true);
            done();
{'fraction_non_alphanumeric': 0.15217391304347827, 'fraction_numerical': 0.04782608695652174, 'mean_word_length': 3.660759493670886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7441123', 'n_tokens_mistral': 654, 'n_tokens_neox': 593, 'n_words': 113}