Skip to content

Commit

Permalink
Restore original order of description/expression serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Aug 8, 2022
1 parent c67eac6 commit 946bf4f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/snapshot.rs
Expand Up @@ -226,15 +226,15 @@ impl MetaData {
if let Some(source) = self.source.as_deref() {
fields.push(("source", Content::from(source)));
}
if let Some(expression) = self.expression.as_deref() {
fields.push(("expression", Content::from(expression)));
}
if let Some(line) = self.assertion_line {
fields.push(("assertion_line", Content::from(line)));
}
if let Some(description) = self.description.as_deref() {
fields.push(("description", Content::from(description)));
}
if let Some(expression) = self.expression.as_deref() {
fields.push(("expression", Content::from(expression)));
}
if let Some(info) = &self.info {
fields.push(("info", info.to_owned()));
}
Expand Down
@@ -1,7 +1,7 @@
---
source: tests/test_settings.rs
description: The snapshot is three integers
expression: "vec![1, 2, 3]"
description: The snapshot is three integers
---
[
1,
Expand Down
@@ -1,7 +1,7 @@
---
source: tests/test_settings.rs
description: The snapshot is four integers
expression: "vec![1, 2, 3, 4]"
description: The snapshot is four integers
info:
env:
ENVIRONMENT: production
Expand Down
@@ -1,7 +1,7 @@
---
source: tests/test_settings.rs
description: The snapshot is four integers
expression: "vec![1, 2, 3, 4]"
description: The snapshot is four integers
info:
env:
- ENVIRONMENT
Expand Down

0 comments on commit 946bf4f

Please sign in to comment.