<commit_before>import expect from 'expect';
import reducer from '../../reducers/books'
import * as types from '../../constants/ActionTypes'

const initialState = [];
const testBook = {
  id: 0,
  title: 'To Kill A Mockingbird'
};

describe('books reducer', () => {
  it('should return the initial state', () => {
    expect(
      reducer(initialState, {})
    ).toEqual(initialState);
  });

  it('should add a book from the book list', () => {
    expect(
      reducer(initialState, {
        type: types.ADD_BOOK,
        book: testBook
      })
    ).toEqual([testBook]);
  });

  it('should delete a book from the book list', () => {
    const oneBookState = [testBook];

    expect(
      reducer(oneBookState, {
        type: types.DELETE_BOOK,
        id: 0
      })
    ).toEqual(initialState);
  });
});<commit_msg>test code outside<commit_after>import expect from 'expect';
import reducer from '../../reducers/books'
import * as types from '../../constants/ActionTypes'

const initialState = [];
const testBook = {
  id: 0,
  title: 'To Kill A Mockingbird'
};
const oneBookState = [testBook];

describe('books reducer', () => {
  it('should return the initial state', () => {
    expect(
      reducer(initialState, {})
    ).toEqual(initialState);
  });

  it('should add a book from the book list', () => {
    expect(
      reducer(initialState, {
        type: types.ADD_BOOK,
        book: testBook
      })
    ).toEqual([testBook]);
  });

  it('should delete a book from the book list', () => {
    expect(
      reducer(oneBookState, {
        type: types.DELETE_BOOK,
        id: 0
      })
    ).toEqual(initialState);
  });
});
{'fraction_non_alphanumeric': 0.16111447607510598, 'fraction_numerical': 0.0024227740763173833, 'mean_word_length': 2.704035874439462, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4411800', 'n_tokens_mistral': 517, 'n_tokens_neox': 517, 'n_words': 136}