tests and js example