Почему Ava js не показывает журнал ошибок локально, только в ci

У меня есть неудачный тест ava, который должен выдавать ошибку следующим образом:

$ npm run test
> [email protected] test /home/travis/build/********/fetch_courses
> tsc && ava
  Uncaught exception in test/fetchTerms.test.ts
  Error: Cannot find module '../config.js'
  Require stack:
  - /home/travis/build/********/fetch_courses/src/fetchTerms.ts
  - /home/travis/build/********/fetch_courses/test/fetchTerms.test.ts
  - /home/travis/build/********/fetch_courses/node_modules/ava/lib/worker/subprocess.js
  › - node_modules/ava/lib/worker/subprocess.js
  › src/fetchTerms.ts:2:1
  › Object.<anonymous> (src/fetchTerms.ts:139:4)
  › Module.m._compile (node_modules/ts-node/src/index.ts:858:23)
  › require.extensions.<computed> (node_modules/ts-node/src/index.ts:861:12)
  ✖ test/fetchTerms.test.ts exited with a non-zero exit code: 1
  ─
  1 uncaught exception
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `tsc && ava`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2020-07-21T21_30_16_127Z-debug.log
The command "npm run test" exited with 1.
cache.2
store build cache

что происходит только в моей сборке travis.

Когда я заново клонирую [мой репозиторий] [1] и запускаю npm install и npm run test, что и происходит в travis, я вижу это ведение журнала.

$ npm run test

> [email protected] test /mnt/c/Users/********/Projects/fetch_courses
> tsc && ava


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `tsc && ava`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /mnt/c/Users/********/.npm/_logs/2020-07-21T22_06_02_028Z-debug.log

Итак, вы можете видеть, что я пропускаю весь вывод/логирование ошибок Ava.

Я не знаю, что еще я могу сделать, но, может быть, это какая-то проблема с конфигурацией? Репозиторий связан, так что не стесняйтесь ковыряться и/или пытаться воспроизвести.


person notacorn    schedule 21.07.2020    source источник
comment
Какой терминал вы используете, я не могу воспроизвести это в стандартном терминале, возможно, попробуйте установить --tap, чтобы Ava не использовала анимацию tty   -  person Elias Schablowski    schedule 22.07.2020
comment
о, ладно, тогда, может быть, это проблема с intellij? я продолжаю искать @EliasSchablowski   -  person notacorn    schedule 22.07.2020


Ответы (1)


Не удалось найти ответ, так как похоже, что проблема локальна только для моей IDE, поэтому мой обходной путь состоял в том, чтобы запустить ava на скомпилированной версии тестов javascript. Ведение журнала там работало по какой-то причине.

person notacorn    schedule 22.07.2020