add javascript object syntax to test pattern, test pattern without protocol too