expectLocale function

void expectLocale(
  1. String locale
)

Assert that the current locale matches.

Implementation

void expectLocale(String locale) {
  final currentLocale = NyLocalization.instance.languageCode;
  expect(
    currentLocale,
    locale,
    reason: 'Expected locale "$locale" but was "$currentLocale"',
  );
}