2017-09-21 11 views
-1

で減速:テストは、これは私がテストしていたファイルである冗談

import { combineReducers } from 'redux'; 
import auth from './auth'; 

export default combineReducers({ 
auth 
}); 

これはテストに私のコードです:

import configureMockStore from 'redux-mock-store'; 
import thunk from 'redux-thunk'; 
import * as api from '../../utilities/synergy-api'; 
import { combineReducers } from 'redux'; 
import auth from '../auth'; 
import * as types from '../../actions/types'; 
import * as actions from '../../actions/authActions'; 

const middlewares = [thunk]; 
const mockStore = configureMockStore(middlewares); 


test('combineReducers',() => { 
expect(actions.auth).toBe('auth'); 
}); 

私は文字列が期待されているというエラーを取得しています、未定義が受信されています。誰でもこれを解決する方法を知っていますか?

+0

あなたのファイル名は何ですか... –

答えて

0

import * as actions from '../../actions/authActions';

であるべき:

import actions from '../../actions/authActions';

関連する問題