`expected` should probably have the type `&[(JsonEvent, &[StackNode])]`. There's no need for it to actually own the values.

You may also want to consider defining this as a macro, so line numbers triggered by failures from `assert_eq!()` will actually point to the correct test.