$unionWith and ordering in $group

Hello dear mongodb community!
I have recently started using the $unionWith aggregation stage and was wondering about the ordering as it is not explicitly written in the documentation whether it is always the case that documents flowing out of the pipeline before $unionWith will always be recorded before documents flowing out of the $unionWith pipeline when recorded with $group as in:

	{$set: {test: 1}},
	{$unionWith: "one"},
	{$group: {
		"_id": null,
		"test": {$first: "$test"}

Here my collection “one” for testing has just one empty document.
In my test, this runs through. But I assume I cannot expect this to be the case always?

Or is there a better way to pick a single value for a field in case not every input document of $group has the field?