adding test that demonstrates how script level code needs to be wrapped

This was confusing to me initially, so documenting this in a test may be useful