Vue test utils error

I tried use jest to build test architecture. I followed official guide but met a lot problem.
Now jest found error “TypeError: _vm.$t is not a function”. I don’t why it happened, so I ask for u.
Here is my some code:
package.json:
{
“jest”: {
“transform”: {
“^.+\.js$”: “babel-jest”,
“.*\.(vue)$”: “vue-jest”
},
“preset”: “@vue/cli-plugin-unit-jest/presets/typescript-and-babel”,
“transformIgnorePatterns”: ["/node_modules/"]
},
“babel”: {
“presets”: ["@babel/preset-env"]
}
}
babel.config.js:
module.exports = {
presets: [
@vue/cli-plugin-babel/preset’ //跟官网的不同
],
“plugins”: [
[
“component”,
{
“libraryName”: “element-ui”,
“styleLibraryName”: “theme-chalk”
}
]
],
“env”: {
“test”: {
“presets”: [[“env”, {“targets”: {“node”: “current”}}]]
}
}
}
excmpe.spec.js:
import { shallowMount } from ‘@vue/test-utils’
import HelloWorld from ‘@/components/common/contactWindow.vue’

describe('HelloWorld.vue', () => {
  it('renders props.msg when passed', () => {
    const wrapper = shallowMount(HelloWorld)
    expect(wrapper.findAll('.service-container').contains('img')).toBe(true);
  })
})

Thanks!

Ugly code, use paste!

Please this:
example.spec.js

package.json

babel.config.js