Add poll tests, make work in node.