move create_test_buffer
use let clause instead of global const
fixes typo that ended up creating a global reference