Add failing hasone tests
WIP: Fix hasOne infinite loop & migrate tests to mocha
Fix hasOne infinite loop