Skip to content

BehaviorSubject bugged in 0.24.1 and 0.25.0-beta #500

@Mike278

Description

@Mike278

Probably the same as #477 but I'm opening a new issue because that one was not reopened.

These tests pass in rxdart 0.23.1:

test('rxdart #477/#500 - a', () async {
  final a = BehaviorSubject.seeded('a')
    .switchMap((_) => BehaviorSubject.seeded('a'))
    ..listen(print);
  await pumpEventQueue();
  expect(await a.first, 'a'); // this future does not complete in 0.24.1 - this is fixed in 0.25.0-beta
});

test('rxdart #477/#500 - b', () async {
  final b = BehaviorSubject.seeded('b')
    .map((_) => 'b')
    .switchMap((_) => BehaviorSubject.seeded('b'))
    ..listen(print);
  await pumpEventQueue();
  expect(await b.first, 'b'); // this future does not complete in 0.25.0-beta
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions