<commit_before>const describe = require("mocha").describe;
const it = require("mocha").it;
const expect = require("chai").expect;

const TypeScriptImportParser = require("../../src/structure-map/typescript-import-parser.js").TypeScriptImportParser;


describe("typescript-import-parser", function() {

    let source = "";
    let actualImportSources = [];


    it("should find entire content import", function() {
        givenSource("import * as myModule from \"my-module\";");
        whenGettingImportSources();
        thenImportSourcesShouldEqual(["my-module.ts"]);
    });

    function givenSource(s) {
        source = s;
    }

    function whenGettingImportSources() {
        let typeScriptHelper = new TypeScriptImportParser();
        actualImportSources = typeScriptHelper.getImportSourcesFromString(source);
    }
<commit_msg>let -> const<commit_after>const describe = require("mocha").describe;
const it = require("mocha").it;
const expect = require("chai").expect;

const TypeScriptImportParser = require("../../src/structure-map/typescript-import-parser.js").TypeScriptImportParser;


describe("typescript-import-parser", function() {

    let source = "";
    let actualImportSources = [];


    it("should find entire content import", function() {
        givenSource("import * as myModule from \"my-module\";");
        whenGettingImportSources();
        thenImportSourcesShouldEqual(["my-module.ts"]);
    });

    function givenSource(s) {
        source = s;
    }

    function whenGettingImportSources() {
        const typeScriptHelper = new TypeScriptImportParser();
        actualImportSources = typeScriptHelper.getImportSourcesFromString(source);
    }

{'fraction_non_alphanumeric': 0.13515115589804386, 'fraction_numerical': 0.0, 'mean_word_length': 3.7954545454545454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4727801', 'n_tokens_mistral': 463, 'n_tokens_neox': 436, 'n_words': 87}