<commit_before>import initializeStore from '../src/store';

describe('CMF store', () => {
	it('shoud expose a function', () => {
		expect(typeof initializeStore).toBe('function');
	});
	it('should initialize the store', () => {
		function reducer() {
			return {};
		}
		const initialState = {};
		const store = initializeStore(reducer, initialState);
		expect(typeof store.dispatch).toBe('function');
		expect(typeof store.subscribe).toBe('function');
		expect(typeof store.getState).toBe('function');
		expect(typeof store.replaceReducer).toBe('function');
		const state = store.getState();
		expect(typeof state.routing).toBe('object');
		expect(typeof state.cmf.settings).toBe('object');
		expect(typeof state.app).toBe('object');
	});
	it('should initialize the store without args', () => {
		const store = initializeStore();
		const state = store.getState();
		expect(typeof state.routing).toBe('object');
		expect(typeof state.cmf.settings).toBe('object');
		expect(typeof state.app).toBe('undefined');
	});
	it('should support object as reducer config', () => {
		const reducer = {
			heyImRoot() {
				return {};
			},
			app() {
				return {};
			},
		};
		const store = initializeStore(reducer);
		const state = store.getState();
		expect(typeof state.routing).toBe('object');
		expect(typeof state.cmf.settings).toBe('object');
		expect(typeof state.app).toBe('object');
		expect(typeof state.heyImRoot).toBe('object');
	});
});<commit_msg>Fix tests<commit_after>import store from '../src/store';

describe('CMF store', () => {
	it('shoud expose a function', () => {
		expect(typeof store.initialize).toBe('function');
	});
	it('should initialize the store', () => {
		function reducer() {
			return {};
		}
		const initialState = {};
		const s = store.initialize(reducer, initialState);
		expect(typeof s.dispatch).toBe('function');
		expect(typeof s.subscribe).toBe('function');
		expect(typeof s.getState).toBe('function');
		expect(typeof s.replaceReducer).toBe('function');
		const state = s.getState();
		expect(typeof state.routing).toBe('object');
		expect(typeof state.cmf.settings).toBe('object');
		expect(typeof state.app).toBe('object');
	});
	it('should initialize the store without args', () => {
		const s = store.initialize();
		const state = s.getState();
		expect(typeof state.routing).toBe('object');
		expect(typeof state.cmf.settings).toBe('object');
		expect(typeof state.app).toBe('undefined');
	});
	it('should support object as reducer config', () => {
		const reducer = {
			heyImRoot() {
				return {};
			},
			app() {
				return {};
			},
		};
		const s = store.initialize(reducer);
		const state = s.getState();
		expect(typeof state.routing).toBe('object');
		expect(typeof state.cmf.settings).toBe('object');
		expect(typeof state.app).toBe('object');
		expect(typeof state.heyImRoot).toBe('object');
	});
});
{'fraction_non_alphanumeric': 0.18780658724597057, 'fraction_numerical': 0.0, 'mean_word_length': 4.687250996015936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6308003', 'n_tokens_mistral': 945, 'n_tokens_neox': 858, 'n_words': 173}