Closed
Description
Тексты не работают с импортами экстеншенов.
- Создаём типовой экстеншен (
bitrix create
) - Пробуем запустить его тесты (
bitrix test
) - Получаем ошибку:
(node:6134) UnhandledPromiseRejectionWarning: Error: Cannot find module 'main.core'
Require stack:
- /home/nook/projects/bec.docker/app/local/js/partner/module/ext1/src/ext1.js
- /home/nook/projects/bec.docker/app/local/js/partner/module/ext1/test/ext1/ext1.test.js
- /home/nook/repos/cli/node_modules/mocha/lib/mocha.js
- /home/nook/repos/cli/node_modules/mocha/index.js
- /home/nook/repos/cli/dist/bitrix.test.js
- /home/nook/repos/cli/bin/bitrix
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Module.require (internal/modules/cjs/loader.js:681:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/home/nook/projects/bec.docker/app/local/js/partner/module/ext1/src/ext1.js:1:1)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Module._compile (/home/nook/repos/cli/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Object.newLoader [as .js] (/home/nook/repos/cli/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:641:32)
(node:6134) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:6134) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Originally posted by @nook-ru in #6 (comment)