platform/packages/inflection2/test/inflection_test.dart
thomashii@dukefirehawk.com 32f3eaa5c4 Added and migrated inflection2
2021-05-02 16:39:25 +08:00

18 lines
581 B
Dart

library inflection.test;
import 'package:test/test.dart';
import '../lib/inflection2.dart';
void main() {
group("The inflection library", () {
test("provides a few convenient helper functions", () {
expect(pluralize("axis"), equals("axes"));
expect(convertToPlural("axis"), equals("axes"));
expect(singularize("Houses"), equals("House"));
expect(convertToSingular("Houses"), equals("House"));
expect(convertToSnakeCase("CamelCase"), equals("camel_case"));
expect(convertToSpinalCase("CamelCase"), equals("camel-case"));
});
});
}