<commit_before>const chai = require("chai");
const mocha = require("mocha");
const expect = chai.expect;
const assert = chai.assert;
const TidalApi = require("../app/TidalApi");
const path = require("path");

describe("Api for Tidal music", () => {
    let tidalApi = new TidalApi({
        username: process.env.TIDAL_USERNAME,
        password: <PASSWORD>,
        token: process.env.TIDAL_TOKEN,
        quality: "HIGH"
    });

    it("search for track", async () => {
        let tracks = await tidalApi.searchFor("Pigs Pink Floyd", TidalApi.searchTypes().TRACKS);
        assert(tracks.length <= 10, "track list is bigger than 10");

        let isAnyTrackNull = false;
        for(let track of tracks) {
            if(!track) {
                isAnyTrackNull = true;
                break;
            }
        }
        assert(isAnyTrackNull === false, "one or more track objects are null");<commit_msg>Changed tests to work with getter in TidalApi<commit_after>const chai = require("chai");
const mocha = require("mocha");
const expect = chai.expect;
const assert = chai.assert;
const TidalApi = require("../app/TidalApi");
const path = require("path");

describe("Api for Tidal music", () => {
    let tidalApi = new TidalApi({
        username: process.env.TIDAL_USERNAME,
        password: <PASSWORD>,
        token: process.env.TIDAL_TOKEN,
        quality: "HIGH"
    });

    it("search for track", async () => {
        let tracks = await tidalApi.searchFor("Pigs Pink Floyd", TidalApi.searchTypes.TRACKS);
        assert(tracks.length <= 10, "track list is bigger than 10");

        let isAnyTrackNull = false;
        for(let track of tracks) {
            if(!track) {
                isAnyTrackNull = true;
                break;
            }
        }
        assert(isAnyTrackNull === false, "one or more track objects are null");
{'fraction_non_alphanumeric': 0.12823275862068967, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 2.5170454545454546, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '720255', 'n_tokens_mistral': 565, 'n_tokens_neox': 540, 'n_words': 152}