Файлы плагинов / пресетов не позволяют экспортировать объекты: не получается заставить работать шутки с babel7 и кофейным скриптом - PullRequest
0 голосов
/ 19 ноября 2018

Я пытаюсь добавить test.coffee в сгенерированный проект vue cli 3, используя jest-preset-coffeescript

Ошибка, not allowed to export objects, связана с babel7 проблема с github не "нравится" babel-preset-jest, babel7 загружается @ vue / cli-plugin-babel @ 3.1.1

babel-preset-jest вытягивается jest-preset-coffeescript

ОБНОВЛЕНИЕ: обнаружена эта проблема: https://github.com/danielbayley/jest-preset-coffeescript/issues/1

    tests/test.coffee
  ● Test suite failed to run

    Plugin/Preset files are not allowed to export objects, only functions. In /Users/luntain/p/baz/node_modules/babel-preset-jest/index.js

      at createDescriptor (node_modules/@babel/core/lib/config/config-descriptors.js:178:11)
      at items.map (node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
          at Array.map (<anonymous>:null:null)
      at createDescriptors (node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
      at createPresetDescriptors (node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
      at passPerPreset (node_modules/@babel/core/lib/config/config-descriptors.js:58:96)
      at cachedFunction (node_modules/@babel/core/lib/config/caching.js:33:19)
      at presets.presets (node_modules/@babel/core/lib/config/config-descriptors.js:29:84)
      at mergeChainOpts (node_modules/@babel/core/lib/config/config-chain.js:320:26)
      at node_modules/@babel/core/lib/config/config-chain.js:283:7
      at buildRootChain (node_modules/@babel/core/lib/config/config-chain.js:68:29)
      at loadPrivatePartialConfig (node_modules/@babel/core/lib/config/partial.js:85:55)
      at loadFullConfig (node_modules/@babel/core/lib/config/full.js:43:39)
      at transformSync (node_modules/@babel/core/lib/transform.js:41:38)
      at Object.transform (node_modules/@babel/core/lib/transform.js:22:38)
      at CoffeeScript.transpile (node_modules/coffeescript/lib/coffeescript/index.js:30:18)
      at Object.<anonymous> (node_modules/coffeescript/lib/coffeescript/coffeescript.js:187:26)
      at Object.<anonymous> (node_modules/coffeescript/lib/coffeescript/coffeescript.js:54:19)
      at CoffeeScript.compile (node_modules/coffeescript/lib/coffeescript/index.js:45:29)
      at Object.exports.process (node_modules/jest-preset-coffeescript/index.js:17:36)
          at Generator.next (<anonymous>:null:null)
          at new Promise (<anonymous>:null:null)
          at Generator.next (<anonymous>:null:null)
...