Move common code for test to “test/test_common.ts” file