Skip to content

Commit

Permalink
Additional unit test for rapid play-stop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Oct 21, 2021
1 parent 1edf745 commit 0b01df1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions just_audio/test/just_audio_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,16 @@ void runTests() {
await player.dispose();
});

test('play-stop', () async {
final player = AudioPlayer();
await player.setUrl('https://bar.bar/foo.mp3');
player.play();
await player.stop();
await Future<void>.delayed(Duration(milliseconds: 200));
expect(mock.mostRecentPlayer?._playing, false);
await player.dispose();
});

test('positionStream emissions: seek while paused', () async {
final player = AudioPlayer();
await player.setUrl('https://bar.bar/foo.mp3');
Expand Down

0 comments on commit 0b01df1

Please sign in to comment.