How to write Jest transformIgnorePatterns

后端 未结 4 2120
独厮守ぢ
独厮守ぢ 2021-02-19 02:52

I have this excpetion

Jest encountered an unexpected token

    This usually means that you are trying to import a file which Jest cannot parse, e.g. it\'s not p         


        
4条回答
  •  你的背包
    2021-02-19 03:04

    I added this setting to my config, but no joy. Still getting the same error as Sergey Aslanvov.

    "transformIgnorePatterns": [
      "/node_modules/(?!@vuetify)"
    ],
    

    also tried

    "transformIgnorePatterns": [
      "\\node_modules\\@vuetify",
    ],
    

    Below is a sample of my component that extends VDataTable

    import {
      Vue,
     Mixins,
     Component,
    } from 'vue-property-decorator';
    
    import { VDataTable } from 'vuetify/lib';
    
    @Component
    export class BPagedGrid extends Mixins(Vue, VDataTable) { }
    

提交回复
热议问题