<commit_before>import { defaultTheme } from '../../src/styles/theme/default-theme';

const themeArgument = Object
  .keys(defaultTheme)
  .reduce((theme, component) => Object.assign({}, theme, { [component]: {} }));

/**
 * Create a classes object from the styles for testing purposes.
 *
 * @param {(Object|Function)} styles - The styles from which the classes will be computed.
 * @returns {Object} - Returns an object with the classes.
 */
export default function createClassesFromStyles(styles) {
  if (typeof styles === 'function') {
    return createClassesFromStyles(styles(themeArgument));
  }<commit_msg>Actually pass the correct default theme to the createClassesFromStyles and not a mocked version<commit_after>import { compileTheme } from '../../src/styles/theme/theme';

const defaultTheme = compileTheme({}, {});

/**
 * Create a classes object from the styles for testing purposes.
 *
 * @param {(Object|Function)} styles - The styles from which the classes will be computed.
 * @returns {Object} - Returns an object with the classes.
 */
export default function createClassesFromStyles(styles) {
  if (typeof styles === 'function') {
    return createClassesFromStyles(styles(defaultTheme));
  }
{'fraction_non_alphanumeric': 0.12469033856317094, 'fraction_numerical': 0.0, 'mean_word_length': 4.585253456221198, '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': '4032169', 'n_tokens_mistral': 309, 'n_tokens_neox': 312, 'n_words': 113}