<commit_before>import { MusicPlayer } from '../../src/components/music-player';


describe('++MusicPlayer tests', () => {
  let mp;

  beforeEach(() => {
    mp = new MusicPlayer();
    document.body.innerHTML = '<div id="renderer"><section id="copier"></section><section id="copyMessage">' +
      '</section><button id="shuffle"></button></div>';
    mp.element = document.getElementById('renderer');
  });

  it('shuffle the url and start play', () => {
    mp.shown = true;
    mp.shuffle();
    mp.share();
  });

  it('should simulate play end', () => {
    mp.playEnd();
    mp.playTrue();
  });

  it('should go on the preview', () => {
    mp.prev();
  });

  it('should copy share', () => {
    mp.share();
    mp.play();
    mp.isShuffleOn = true;
    mp.shuffle();
  });

  it('should simulate the stop player', () => {
    mp.index = 7;
    mp.next();
  });

  it('should pause the player', () => {
    mp.pause();
  });

  it('should copy the share url', (done) => {
    mp.navigator = {
      clipboard: {
        writeText(data) { return Promise.resolve(data); }
      }<commit_msg>music tests player updated<commit_after>import { MusicPlayer } from '../../src/components/music-player';


describe('++MusicPlayer tests', () => {
  let mp;

  beforeEach(() => {
    mp = new MusicPlayer();
    document.body.innerHTML = '<div id="renderer"><section id="copier"></section><section id="copyMessage">' +
      '</section><button id="shuffle"></button></div>';
    mp.element = document.getElementById('renderer');
  });

  it('shuffle the url and start play', () => {
    mp.shown = true;
    mp.shuffle();
    mp.share();
  });

  it('should simulate play end', () => {
    mp.playEnd();
    mp.playTrue();
  });

  it('should go on the preview', () => {
    mp.index = 0;
    mp.prev();
  });

  it('should go on the preview for the first song', () => {
    mp.index = -1;
    mp.prev();
  });

  it('should copy share', () => {
    mp.share();
    mp.play();
    mp.isShuffleOn = true;
    mp.shuffle();
  });

  it('should simulate the stop player', () => {
    mp.index = 7;
    mp.next();
  });

  it('should pause the player', () => {
    mp.pause();
  });

  it('should copy the share url', (done) => {
    mp.navigator = {
      clipboard: {
        writeText(data) { return Promise.resolve(data); }
      }
{'fraction_non_alphanumeric': 0.21176975945017182, 'fraction_numerical': 0.001718213058419244, 'mean_word_length': 2.738362760834671, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 38, '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': '112866', 'n_tokens_mistral': 776, 'n_tokens_neox': 749, 'n_words': 167}