<commit_before>import React from 'react'
import renderer from 'react-test-renderer'
import { mount } from 'enzyme'

import Auth from '../../src/components/auth.jsx'

describe('Auth', () => {
  test('matches snapshot', () => {
    const component = <Auth />
    const tree = renderer.create(component).toJSON()
    expect(tree).toMatchSnapshot()
  })
})<commit_msg>Add test for client ID in auth URL<commit_after>import React from 'react'
import renderer from 'react-test-renderer'
import { shallow } from 'enzyme'

import Auth from '../../src/components/auth.jsx'
import Config from '../../src/public/config'

describe('Auth', () => {
  let component = null

  beforeEach(() => {
    component = <Auth />
  })

  test('matches snapshot', () => {
    const tree = renderer.create(component).toJSON()
    expect(tree).toMatchSnapshot()
  })

  test('includes Spotify client ID in link', () => {
    const link = shallow(component).find('.spotify-button')
    const regex = new RegExp(Config.spotify.clientId)
    expect(link.props().href).toMatch(regex)
  })
})
{'fraction_non_alphanumeric': 0.1680830972615675, 'fraction_numerical': 0.0, 'mean_word_length': 3.774774774774775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4368315', 'n_tokens_mistral': 321, 'n_tokens_neox': 318, 'n_words': 80}