View Full Version : require lib in tests

31 May 2017, 9:01 AM
Trying to require a lib file in a test according to https://www.sencha.com/blog/sencha-test-2-1-is-now-generally-available/ but is throwing error that module is not found. If I debug and type module in console, I see the file is loaded and require with full path as well is working, but never with relative path.

module.children[55].filename // "/Users/vadim/Documents/Projects/myProj/test/libs/describes/myFile.js

require(module.children[55].filename) // works

require('../libs/describes/myFile') // is not working.

How should I require the lib witha relative path ?