cyberhybridhub/test/utils/spelling_spoken_word_test.dart
nathanAndrinoid 4459852f83
Some checks failed
Admin portal tests / test (push) Has been cancelled
spelling
2026-06-05 03:22:35 +00:00

30 lines
712 B
Dart

import 'package:cyberhybridhub/utils/spelling_spoken_word.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('spellingWordToSpeak extracts quoted word', () {
expect(
spellingWordToSpeak(
"Is 'colour' spelled correctly? Swipe toward +10 for yes.",
),
'colour',
);
});
test('spellingWordToSpeak handles double quotes', () {
expect(
spellingWordToSpeak('Is "separate" spelled correctly?'),
'separate',
);
});
test('spellingWordToSpeak returns null for generic test text', () {
expect(
spellingWordToSpeak(
'Starter question: enter a whole number between -10 and 10.',
),
isNull,
);
});
}