Here is my Vue.js code snippet:
export default {
name: 'App',
components: {
},
created() {
let t = typeof t === 'undefined' ? {} : t; // ISSUE LINE
}
}
The ISSUE LINE runs successfully in the browser without any errors and passes the vue-cli compile process. However, when attempting to run tests for this component in Jest, a compile error is reported:
ReferenceError: Cannot access 't' before initialization
Why does the app work in the browser but not in Jest? Can this compile error be skipped?