Jest / Ts-Jest / Babel:调试失败。假表达:输出生成失败

时间:2018-04-02 16:04:30

标签: node.js typescript babeljs jestjs

使用TypeScript 2.8,我们现在只能从源文件生成.d.ts。所以我的tsconfig.json变为:

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "module": "commonjs",
    "target": "es5",
    "lib": ["ES6","ES2017","ESNext"],
    "downlevelIteration": true,
    "moduleResolution": "node",
    "declaration": true,
    "emitDeclarationOnly": true,
    "declarationDir": "./lib"
  },
  "exclude": [
    "node_modules"
  ],
  "include": [
    "src/**/*"
  ],
  "strict": true
}

问题是构建被破坏了(https://travis-ci.org/jy95/mediaScan/jobs/359573738)。 我的回购:https://github.com/jy95/mediaScan/tree/prettier

任何想法如何解决?

我的jest.config.js:

// jest.config.js
module.exports = {
    verbose: true,
    "moduleFileExtensions": [
        "ts",
        "tsx",
        "js"
    ],
    "transform": {
        "^.+\\.tsx?$": "ts-jest"
    },
    "testMatch": [
        "<rootDir>/__tests__/**/*.(ts|tsx|js)"
    ],
    "testPathIgnorePatterns": ["<rootDir>/node_modules/", "<rootDir>/__tests__/__helpers__/"],
    "collectCoverage": true
};

由于

0 个答案:

没有答案