| Index: third_party/pkg/angular/test/formatter/arrayify_spec.dart
|
| diff --git a/third_party/pkg/angular/test/formatter/arrayify_spec.dart b/third_party/pkg/angular/test/formatter/arrayify_spec.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..049cd486c484323b6ba9ef58ab1f37d364d1c6f3
|
| --- /dev/null
|
| +++ b/third_party/pkg/angular/test/formatter/arrayify_spec.dart
|
| @@ -0,0 +1,18 @@
|
| +library map_spec;
|
| +
|
| +import '../_specs.dart';
|
| +import 'package:angular/formatter/module.dart';
|
| +
|
| +void main() {
|
| + describe('arrayify', () {
|
| + it('should convert a map to list of key value pairs', (Parser parse, FormatterMap formatters) {
|
| + List result = parse('{"key1": "value1", "key2": "value2"} | arrayify').eval(null, formatters);
|
| + expect(result.map((kv) => kv.key)).toEqual(["key1", "key2"]);
|
| + expect(result.map((kv) => kv.value)).toEqual(["value1", "value2"]);
|
| + });
|
| +
|
| + it('should treat null as noop', (Parser parse, FormatterMap formatters) {
|
| + expect(parse('null | arrayify').eval(null, formatters)).toEqual(null);
|
| + });
|
| + });
|
| +}
|
|
|