JavaScript : testing gist functionality