Skip to Content
0
Jun 18, 2020 at 01:56 PM

XSJS Unit Testing: require is not defined

339 Views

Dear All,

I am trying to test a .xsjs file via Unit Testing, but the test spec cannot locate the .xsjs file (please see attachment).

I have tried several alternatives:

require("attachments")
require("attachments.xsjs")
require("./attachments.xsjs")
require("../attachments.xsjs")
require("../../lib/attachments.xsjs")

etc..

Hopefully someone from the Community has come across this issue before and is able to help.

Many thanks

Regards

Pedro Espinosa

Attachments

capture.png (361.9 kB)