Skip to content

Commit

Permalink
outline: Do not omit an empty nodes field when marshalling to JSON (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dlipovetsky authored Jan 18, 2021
1 parent 9a782fb commit 06744e8
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ginkgo/outline/_testdata/alias_test.go.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"Describe","text":"NodotFixture","start":131,"end":786,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Describe","text":"normal","start":176,"end":309,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":216,"end":305,"spec":true,"focused":false,"pending":false,"nodes":[{"name":"By","text":"normal","start":251,"end":273,"spec":false,"focused":false,"pending":false},{"name":"By","text":"normal","start":277,"end":299,"spec":false,"focused":false,"pending":false}]}]},{"name":"Context","text":"normal","start":312,"end":392,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":351,"end":388,"spec":true,"focused":false,"pending":false}]},{"name":"When","text":"normal","start":395,"end":472,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":431,"end":468,"spec":true,"focused":false,"pending":false}]},{"name":"It","text":"normal","start":475,"end":511,"spec":true,"focused":false,"pending":false},{"name":"Specify","text":"normal","start":514,"end":555,"spec":true,"focused":false,"pending":false},{"name":"Measure","text":"normal","start":558,"end":625,"spec":true,"focused":false,"pending":false},{"name":"DescribeTable","text":"normal","start":628,"end":704,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":676,"end":700,"spec":true,"focused":false,"pending":false}]},{"name":"DescribeTable","text":"normal","start":707,"end":783,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":755,"end":779,"spec":true,"focused":false,"pending":false}]}]}]
[{"name":"Describe","text":"NodotFixture","start":131,"end":786,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Describe","text":"normal","start":176,"end":309,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":216,"end":305,"spec":true,"focused":false,"pending":false,"nodes":[{"name":"By","text":"normal","start":251,"end":273,"spec":false,"focused":false,"pending":false,"nodes":[]},{"name":"By","text":"normal","start":277,"end":299,"spec":false,"focused":false,"pending":false,"nodes":[]}]}]},{"name":"Context","text":"normal","start":312,"end":392,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":351,"end":388,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"When","text":"normal","start":395,"end":472,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":431,"end":468,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"It","text":"normal","start":475,"end":511,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"Specify","text":"normal","start":514,"end":555,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"Measure","text":"normal","start":558,"end":625,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"DescribeTable","text":"normal","start":628,"end":704,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":676,"end":700,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"DescribeTable","text":"normal","start":707,"end":783,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":755,"end":779,"spec":true,"focused":false,"pending":false,"nodes":[]}]}]}]
2 changes: 1 addition & 1 deletion ginkgo/outline/_testdata/focused_test.go.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"Describe","text":"unfocused","start":116,"end":624,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FDescribe","text":"focused","start":148,"end":245,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":180,"end":241,"spec":true,"focused":true,"pending":false,"nodes":[{"name":"By","text":"focused","start":206,"end":219,"spec":false,"focused":true,"pending":false},{"name":"By","text":"focused","start":223,"end":236,"spec":false,"focused":true,"pending":false}]}]},{"name":"FContext","text":"focused","start":248,"end":311,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":279,"end":307,"spec":true,"focused":true,"pending":false}]},{"name":"FWhen","text":"focused","start":314,"end":374,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":342,"end":370,"spec":true,"focused":true,"pending":false}]},{"name":"FIt","text":"focused","start":377,"end":405,"spec":true,"focused":true,"pending":false},{"name":"FSpecify","text":"focused","start":408,"end":441,"spec":true,"focused":true,"pending":false},{"name":"FMeasure","text":"focused","start":444,"end":493,"spec":true,"focused":true,"pending":false},{"name":"FDescribeTable","text":"focused","start":496,"end":557,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"Entry","text":"focused","start":537,"end":553,"spec":true,"focused":true,"pending":false}]},{"name":"DescribeTable","text":"focused","start":560,"end":621,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FEntry","text":"focused","start":600,"end":617,"spec":true,"focused":true,"pending":false}]}]}]
[{"name":"Describe","text":"unfocused","start":116,"end":624,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FDescribe","text":"focused","start":148,"end":245,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":180,"end":241,"spec":true,"focused":true,"pending":false,"nodes":[{"name":"By","text":"focused","start":206,"end":219,"spec":false,"focused":true,"pending":false,"nodes":[]},{"name":"By","text":"focused","start":223,"end":236,"spec":false,"focused":true,"pending":false,"nodes":[]}]}]},{"name":"FContext","text":"focused","start":248,"end":311,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":279,"end":307,"spec":true,"focused":true,"pending":false,"nodes":[]}]},{"name":"FWhen","text":"focused","start":314,"end":374,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":342,"end":370,"spec":true,"focused":true,"pending":false,"nodes":[]}]},{"name":"FIt","text":"focused","start":377,"end":405,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"FSpecify","text":"focused","start":408,"end":441,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"FMeasure","text":"focused","start":444,"end":493,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"FDescribeTable","text":"focused","start":496,"end":557,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"Entry","text":"focused","start":537,"end":553,"spec":true,"focused":true,"pending":false,"nodes":[]}]},{"name":"DescribeTable","text":"focused","start":560,"end":621,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FEntry","text":"focused","start":600,"end":617,"spec":true,"focused":true,"pending":false,"nodes":[]}]}]}]
2 changes: 1 addition & 1 deletion ginkgo/outline/_testdata/mixed_test.go.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"FDescribe","text":"unfocused","start":71,"end":582,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FContext","text":"unfocused","start":104,"end":203,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"unfocused","start":137,"end":167,"spec":true,"focused":false,"pending":false},{"name":"FIt","text":"focused","start":170,"end":199,"spec":true,"focused":true,"pending":false}]},{"name":"Context","text":"unfocused","start":206,"end":304,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FIt","text":"focused","start":238,"end":267,"spec":true,"focused":true,"pending":false},{"name":"It","text":"unfocused","start":270,"end":300,"spec":true,"focused":false,"pending":false}]},{"name":"FContext","text":"focused","start":307,"end":401,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":338,"end":366,"spec":true,"focused":true,"pending":false},{"name":"It","text":"focused","start":369,"end":397,"spec":true,"focused":true,"pending":false}]},{"name":"PContext","text":"unfocused","start":404,"end":579,"spec":false,"focused":false,"pending":true,"nodes":[{"name":"FIt","text":"unfocused","start":437,"end":505,"spec":true,"focused":false,"pending":true,"nodes":[{"name":"By","text":"unfocused","start":466,"end":481,"spec":false,"focused":false,"pending":true},{"name":"By","text":"unfocused","start":485,"end":500,"spec":false,"focused":false,"pending":true}]},{"name":"It","text":"unfocused","start":508,"end":575,"spec":true,"focused":false,"pending":true,"nodes":[{"name":"By","text":"unfocused","start":536,"end":551,"spec":false,"focused":false,"pending":true},{"name":"By","text":"unfocused","start":555,"end":570,"spec":false,"focused":false,"pending":true}]}]}]}]
[{"name":"FDescribe","text":"unfocused","start":71,"end":582,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FContext","text":"unfocused","start":104,"end":203,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"unfocused","start":137,"end":167,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"FIt","text":"focused","start":170,"end":199,"spec":true,"focused":true,"pending":false,"nodes":[]}]},{"name":"Context","text":"unfocused","start":206,"end":304,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FIt","text":"focused","start":238,"end":267,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"It","text":"unfocused","start":270,"end":300,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"FContext","text":"focused","start":307,"end":401,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":338,"end":366,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"It","text":"focused","start":369,"end":397,"spec":true,"focused":true,"pending":false,"nodes":[]}]},{"name":"PContext","text":"unfocused","start":404,"end":579,"spec":false,"focused":false,"pending":true,"nodes":[{"name":"FIt","text":"unfocused","start":437,"end":505,"spec":true,"focused":false,"pending":true,"nodes":[{"name":"By","text":"unfocused","start":466,"end":481,"spec":false,"focused":false,"pending":true,"nodes":[]},{"name":"By","text":"unfocused","start":485,"end":500,"spec":false,"focused":false,"pending":true,"nodes":[]}]},{"name":"It","text":"unfocused","start":508,"end":575,"spec":true,"focused":false,"pending":true,"nodes":[{"name":"By","text":"unfocused","start":536,"end":551,"spec":false,"focused":false,"pending":true,"nodes":[]},{"name":"By","text":"unfocused","start":555,"end":570,"spec":false,"focused":false,"pending":true,"nodes":[]}]}]}]}]
2 changes: 1 addition & 1 deletion ginkgo/outline/_testdata/nestedfocused_test.go.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"FDescribe","text":"unfocused","start":71,"end":474,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FContext","text":"unfocused","start":104,"end":273,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"unfocused","start":137,"end":204,"spec":true,"focused":false,"pending":false,"nodes":[{"name":"By","text":"unfocused","start":165,"end":180,"spec":false,"focused":false,"pending":false},{"name":"By","text":"unfocused","start":184,"end":199,"spec":false,"focused":false,"pending":false}]},{"name":"FIt","text":"focused","start":207,"end":269,"spec":true,"focused":true,"pending":false,"nodes":[{"name":"By","text":"focused","start":234,"end":247,"spec":false,"focused":true,"pending":false},{"name":"By","text":"focused","start":251,"end":264,"spec":false,"focused":true,"pending":false}]}]},{"name":"Context","text":"unfocused","start":276,"end":374,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FIt","text":"focused","start":308,"end":337,"spec":true,"focused":true,"pending":false},{"name":"It","text":"unfocused","start":340,"end":370,"spec":true,"focused":false,"pending":false}]},{"name":"FContext","text":"focused","start":377,"end":471,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":408,"end":436,"spec":true,"focused":true,"pending":false},{"name":"It","text":"focused","start":439,"end":467,"spec":true,"focused":true,"pending":false}]}]}]
[{"name":"FDescribe","text":"unfocused","start":71,"end":474,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FContext","text":"unfocused","start":104,"end":273,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"unfocused","start":137,"end":204,"spec":true,"focused":false,"pending":false,"nodes":[{"name":"By","text":"unfocused","start":165,"end":180,"spec":false,"focused":false,"pending":false,"nodes":[]},{"name":"By","text":"unfocused","start":184,"end":199,"spec":false,"focused":false,"pending":false,"nodes":[]}]},{"name":"FIt","text":"focused","start":207,"end":269,"spec":true,"focused":true,"pending":false,"nodes":[{"name":"By","text":"focused","start":234,"end":247,"spec":false,"focused":true,"pending":false,"nodes":[]},{"name":"By","text":"focused","start":251,"end":264,"spec":false,"focused":true,"pending":false,"nodes":[]}]}]},{"name":"Context","text":"unfocused","start":276,"end":374,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"FIt","text":"focused","start":308,"end":337,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"It","text":"unfocused","start":340,"end":370,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"FContext","text":"focused","start":377,"end":471,"spec":false,"focused":true,"pending":false,"nodes":[{"name":"It","text":"focused","start":408,"end":436,"spec":true,"focused":true,"pending":false,"nodes":[]},{"name":"It","text":"focused","start":439,"end":467,"spec":true,"focused":true,"pending":false,"nodes":[]}]}]}]
2 changes: 1 addition & 1 deletion ginkgo/outline/_testdata/nodot_test.go.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"Describe","text":"NodotFixture","start":112,"end":715,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Describe","text":"normal","start":154,"end":274,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":191,"end":270,"spec":true,"focused":false,"pending":false,"nodes":[{"name":"By","text":"normal","start":223,"end":242,"spec":false,"focused":false,"pending":false},{"name":"By","text":"normal","start":246,"end":265,"spec":false,"focused":false,"pending":false}]}]},{"name":"Context","text":"normal","start":277,"end":351,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":313,"end":347,"spec":true,"focused":false,"pending":false}]},{"name":"When","text":"normal","start":354,"end":425,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":387,"end":421,"spec":true,"focused":false,"pending":false}]},{"name":"It","text":"normal","start":428,"end":461,"spec":true,"focused":false,"pending":false},{"name":"Specify","text":"normal","start":464,"end":502,"spec":true,"focused":false,"pending":false},{"name":"Measure","text":"normal","start":505,"end":566,"spec":true,"focused":false,"pending":false},{"name":"DescribeTable","text":"normal","start":569,"end":639,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":614,"end":635,"spec":true,"focused":false,"pending":false}]},{"name":"DescribeTable","text":"normal","start":642,"end":712,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":687,"end":708,"spec":true,"focused":false,"pending":false}]}]}]
[{"name":"Describe","text":"NodotFixture","start":112,"end":715,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Describe","text":"normal","start":154,"end":274,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":191,"end":270,"spec":true,"focused":false,"pending":false,"nodes":[{"name":"By","text":"normal","start":223,"end":242,"spec":false,"focused":false,"pending":false,"nodes":[]},{"name":"By","text":"normal","start":246,"end":265,"spec":false,"focused":false,"pending":false,"nodes":[]}]}]},{"name":"Context","text":"normal","start":277,"end":351,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":313,"end":347,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"When","text":"normal","start":354,"end":425,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"It","text":"normal","start":387,"end":421,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"It","text":"normal","start":428,"end":461,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"Specify","text":"normal","start":464,"end":502,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"Measure","text":"normal","start":505,"end":566,"spec":true,"focused":false,"pending":false,"nodes":[]},{"name":"DescribeTable","text":"normal","start":569,"end":639,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":614,"end":635,"spec":true,"focused":false,"pending":false,"nodes":[]}]},{"name":"DescribeTable","text":"normal","start":642,"end":712,"spec":false,"focused":false,"pending":false,"nodes":[{"name":"Entry","text":"normal","start":687,"end":708,"spec":true,"focused":false,"pending":false,"nodes":[]}]}]}]
Loading

0 comments on commit 06744e8

Please sign in to comment.