Conversation
| test('empty', () async { | ||
| var builder = jsonSerializable(BuilderOptions.empty) as PartBuilder; | ||
| expect(builder, isNotNull); | ||
| expect(records, isEmpty); |
There was a problem hiding this comment.
Note that since the logs come through asynchronously you would never see them at this point, you would need to add an await null or something along those lines. Not really sure the absolute best way to deal with it honestly.
| config[entry.key] = entry.value; | ||
|
|
||
| expect(() => jsonSerializable(new BuilderOptions(config)), | ||
| _throwsCastError); |
There was a problem hiding this comment.
Worth checking the actual message here?
There was a problem hiding this comment.
I don't think so. They will all be 'String is not a bool' etc.
There was a problem hiding this comment.
Ya I was just wondering if you wanted to check the cast messages were correct, but its probably overkill
| as PartBuilder; | ||
| expect(builder, isNotNull); | ||
|
|
||
| expect(records.single.message, |
There was a problem hiding this comment.
I don't get how this is passing given my comment above...
| ? null | ||
| : new Map<String, DateTime>.fromIterables( | ||
| (json['stringDateTimeMap'] as Map<String, dynamic>).keys, | ||
| (json['stringDateTimeMap'] as Map).keys.cast<String>(), |
There was a problem hiding this comment.
nit: should we be using .map instead?
There was a problem hiding this comment.
Same-same, right? This seems easier...
No description provided.