mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-26 12:52:40 +02:00
25 lines
716 B
Dart
25 lines
716 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:spotiflac_android/utils/artist_utils.dart';
|
|
|
|
void main() {
|
|
test('primary artist prefers the first album artist', () {
|
|
expect(
|
|
primaryArtistName(
|
|
'Track Artist, Guest Artist',
|
|
albumArtist: 'Album Artist & Collaborator',
|
|
),
|
|
'Album Artist',
|
|
);
|
|
});
|
|
|
|
test('primary artist handles provider separator variants', () {
|
|
expect(primaryArtistName('One; Two & Three'), 'One');
|
|
expect(primaryArtistName('One feat. Two'), 'One');
|
|
expect(primaryArtistName('AC/DC'), 'AC/DC');
|
|
expect(
|
|
primaryArtistName('Actual Artist, Guest', albumArtist: 'Various Artists'),
|
|
'Actual Artist',
|
|
);
|
|
});
|
|
}
|