8000 В тестах не резолвятся импортированные экстеншены · Issue #7 · bitrix-tools/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
В тестах не резолвятся импортированные экстеншены #7
Closed
@nook-ru

Description

@nook-ru

Тексты не работают с импортами экстеншенов.

  1. Создаём типовой экстеншен (bitrix create)
  2. Пробуем запустить его тесты (bitrix test)
  3. Получаем ошибку:
(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.

image

Originally posted by @nook-ru in #6 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0