It's all about the answers!

Ask a question

Load RM API into JS without connecting to server.

Ankita M U (404) | asked Feb 15 '17, 4:10 a.m.

Is there a way to include the RM API into JS without connecting to server.

I am trying to test the DNG extension widget code written using RM API. I am using mocha JavaScript test framework.

Issue:I am getting an error on "RM.Data.Attributes.IDENTIFIER" as undefined since I have not included RM API

Any help provided is highly appreciated.

Thank you.

One answer

permanent link
Donald Nong (14.3k213) | answered Feb 16 '17, 4:10 a.m.

You call it an "extension" but still expect it to work without the "base" which you have to retrieve from the server? You can try to rip out all the JavaScript from the RDNG server and server it from another server. And still, you need some soft of server for it to work. So why not just use the existing RDNG server?

Ankita M U commented Feb 16 '17, 10:56 a.m. | edited Feb 16 '17, 10:59 a.m.

My main.js (example) is yes an extension that runs on the DNG server.

I am trying to test main.js code using the test framework called mocha. I am just a learner on this framework.

I wanted to run tests similar to Junits for Java which doesn't need a server to run the tests. Wanted to know similar to case of RTC in java we have jars that don't need server during testing.

Donald Nong commented Feb 16 '17, 8:22 p.m.

I'm not aware such testing method with JavaScript at all. For the RM extension API, it definitely needs a running environment.

Your answer

Register or to post your answer.