Converting from curl to requirejs and adding first example test