Git Product home page Git Product logo

ts-jest-bug's Introduction

Vue.extend-jest-bug

This is only a test related bug. If a component is loaded async and has a globally registered component in it, it will fail if the loaded component is written with Vue.extend (for example in typescript). This repo is a reproduction repository to show this behavior.

To see the error for yourself you can setup the project and execute npm run test:unit. In the test you can see this warning: [Vue warn]: Unknown custom element: <GloballyLoaded> - did you register the component correctly? For recursive components, make sure to provide the "name" option. To prove that this only occurred for Vue.extend (typescript) you can change the async loaded component inside the componentLoader to @/components/HelloWorld.vue to get rid of the error. Another way to get rid of the error is to load the component sync. To load the component sync you can uncomment the lines in the componentLoader.

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Run your unit tests

npm run test:unit

Customize configuration

See Configuration Reference.

ts-jest-bug's People

Contributors

mrwook avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.