refactor test to use amd
fix callback argument