我遵循这个redux教程-使用不变的,试图使我自己版本的应用程序更好地理解不可变和Redux,我不明白为什么我的测试失败。Mocha的输出显示预期值是相同的,但我认为顺序可能导致测试失败。然而,Mocha的输出没有显示List对象的实际顺序。List.of()是对象数组的正确方法吗?
core_spec.js
import {List, Map} from 'immutable';
import {expect} from 'chai';
import {initAlbums, next, rate} from '../src/core';
d
Hello:需要您在chai断言方面的帮助。
我有一个JSON响应,如下所示。我想断言它只包含"Lastname是强制性的“。
我尝试使用这个语句,但是我得到的错误是AssertionError: expected [ Array(2) ] to have a deep property '#text'。请帮助如何正确地写这个。
使用expect
chai.expect(data.response.error).to.have.deep.property('#text', 'Lastname is mandatory.');
使用应
da