Adding unit tests for fromjs example