Skip to content

Commit

Permalink
Fix failing test and follow style of existing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelzingg authored and SandroMaglione committed Jan 18, 2024
1 parent e7455f0 commit 5001da1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/fpdart/test/src/state_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ void main() {

final traverse = State.traverseListWithIndex(
list,
(a, i) => State((state) {
(a, i) => State<int, String>((s) {
sideEffect++;
return (a + i.toString(), state);
return (a + i.toString(), s);
}));
expect(sideEffect, 0);
final (resultList, resultState) = traverse.run(1);
Expand All @@ -233,9 +233,9 @@ void main() {
final list = ['a', 'b'];
final traverse = State.traverseList(
list,
(a) => State((state) {
(a) => State<int, String>((s) {
sideEffect++;
return (a, state);
return (a, s);
}));
expect(sideEffect, 0);
final (resultList, resultState) = traverse.run(1);
Expand All @@ -247,13 +247,13 @@ void main() {
test('sequenceList', () {
var sideEffect = 0;
final list = [
State((int state) {
State<int, String>((s) {
sideEffect++;
return ('a', state);
return ('a', s);
}),
State((String state) {
State<int, String>((s) {
sideEffect++;
return ('b', state);
return ('b', s);
})
];
final sequence = State.sequenceList(list);
Expand Down

0 comments on commit 5001da1

Please sign in to comment.