나는 here 튜토리얼을 통해 작업하고 있는데, 처음에는 대부분의 기본적인 chai 테스트가 실패한 것으로 나타났습니다. 여기일관성있게 실패하는 Chai/Mocha 불변의 테스트
import {List} from 'immutable';
export function setEntries(state, entries){
return state.set('entries', entries);
}
실패 오류 메시지입니다 :
1) application logic setEntries adds the entries to the state:
AssertionError: expected { Object (size, _root, ...) } to equal { Object (size, _root, ...) }
+ expected - actual
"size": 2
}
]
]
- "ownerID": [undefined]
+ "ownerID": {}
}
"size": 1
}
는 '내가 할 수있는 여기 여기
import {List, Map} from 'immutable';
import {expect} from 'chai';
import {setEntries} from '../src/core';
describe('application logic',() => {
describe('setEntries',() => {
it('adds the entries to the state',() => {
const state = Map();
const entries = List.of('Trainspotting', '28 Days Later');
const nextState = setEntries(state, entries);
expect(nextState).to.equal(Map({
entries: List.of('Trainspotting', '28 Days Later')
}));
});
});
});
하고 실패한 테스트에 대한 현재의 예에 대한 코드를 테스트입니다 이 오류의 의미에 대한 의미있는 문서를 찾은 것 같으며 비슷한 문제를 언급하는이 자습서의 다른 사용자는 보지 못합니다. 이게 질식하는 곳이면 어떨까요?