Tag: chai immutable

不可变的柴断言错误虽然预期等于结果

我一直在使用节点/ redux,我有以下testing与柴: AssertionError: expected 'Map { "winos": List [ Map { "id": 1, "x": 1, "y": 1, "movable": false }, Map { "id": 2, "x": 2, "y": 2, "movable": false }, Map { "id": 5, "x": 5, "y": 5, "movable": false } ] }' to equal 'Map { "winos": List [ Map { "id": 1, […]

Immutablejs Map.update打破了unit testing

我试图拿起Redux和我下面的教程使用ImmutableJs。 我对ImmutableJs是完全陌生的,我只是想通过API文档去实现。 我的练习应用比教程复杂得多,所以我走了一段路,可能已经迷路了。 任何时候我使用Map.update()方法,我无法find一种方法来成功地testing我的代码。 这是我写的一个testing,试图找出什么是错的: import chai, {expect} from 'chai'; import chaiImmutable from 'chai-immutable'; import {List, Map} from 'immutable'; chai.use(chaiImmutable); describe("Immutable Test Issues", () => { it("should present accurate immutable equality", () => { // — Maps with Lists match just fine const a1 = Map({ test: 1, args: List([1, 2]) }); const a2 = […]