Skip to Content
avatar image
Former Member

(XSJS) ​How to import a lib file who is not in current test’s sub folder?

How to import a file who is not in current test’s sub folder?

I have sample codes as below and try to import calculator in sampleTest.

/todo_list/todo_nodejs/calc1/calculator.xsjslib
/todo_list/todo_nodejs/test/sampleTest.xsjslib

I’ve tried below things and none of them works for me

————–

$.import(“todo_list.todo_nodejs.calc1”, “calculator”);

$.import(“todo_nodejs.calc1”, “calculator”);

$.import(“../calc1”, “calculator”);

var clib = $.import(“../calc1/calculator.xsjslib”);

—————–

Any idea?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 03 at 04:21 PM

    Hi,

    According to the documentation, the "$.import" should enable you to load your custom xsjslib without a problem.

    Have you activated the xsjslib artifacts before testing your code?

    Best regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded