<commit_before>import fetch from 'jest-fetch-mock'

jest.mock('warning')

const createLocalStorageMock = () => {
  let store = {}

  return {
    setItem(key, value) {
      store[key] = value.toString()
    },
    getItem(key) {
      return store[key] || null
    },
    removeItem(key) {
      delete store[key]
    },
    clear() {
      store = {}
    }
  }
}

const createSessionStorageMock = () => {
  let store = {}

  return {
    setItem(key, value) {
      store[key] = value.toString()
    },
    getItem(key) {
      return store[key] || null
    },
    removeItem(key) {
      delete store[key]
    },
    clear() {
      store = {}
    }
  }
}

global.fetch = fetch
global.localStorage = createLocalStorageMock()
global.sessionStorage = createSessionStorageMock()
<commit_msg>No need to mock warning in setupTests<commit_after>import fetch from 'jest-fetch-mock'

const createLocalStorageMock = () => {
  let store = {}

  return {
    setItem(key, value) {
      store[key] = value.toString()
    },
    getItem(key) {
      return store[key] || null
    },
    removeItem(key) {
      delete store[key]
    },
    clear() {
      store = {}
    }
  }
}

const createSessionStorageMock = () => {
  let store = {}

  return {
    setItem(key, value) {
      store[key] = value.toString()
    },
    getItem(key) {
      return store[key] || null
    },
    removeItem(key) {
      delete store[key]
    },
    clear() {
      store = {}
    }
  }
}

global.fetch = fetch
global.localStorage = createLocalStorageMock()
global.sessionStorage = createSessionStorageMock()

{'fraction_non_alphanumeric': 0.1433080808080808, 'fraction_numerical': 0.0, 'mean_word_length': 2.415948275862069, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2549702', 'n_tokens_mistral': 523, 'n_tokens_neox': 515, 'n_words': 99}