Git Product home page Git Product logo

jest_webpack_example's People

Contributors

brandonmcconnell avatar jenniferabowd avatar muhammad-shahid-jamal avatar speaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jest_webpack_example's Issues

Add Webpack 5 version

Hi, this example has become a bit stale. I'm hoping someone can help modernize this example to help others during Hacktoberfest. If it doesn't happen, that is okay, but maybe this can be a good chance for someone to participate. I'm making several tickets to help break this up into chunks. I'm happy to help people, but I don't have much time to rewrite this code.

Can someone upgrade Webpack to the current version please?

Implement hot reloading

Currently, there is no hot re-loading in this app. It would be awesome if someone added it in. Currently, you need to run the app by doing npm run watch and npm start in two different terminal windows.

Upgrade Babel

The versions of various babel packages used are over 5 years old. It would be very helpful if someone upgraded those.

Remove server

This example is very convoluted. I think we can just remove the server to simplify it.

import sweetalert2 css error

in teamAmerica.test.js
I added one line

import swal from 'sweetalert2';

and

npm run test

//red color messages seem there is an error
@Keyframes swal2-rotate-loading {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }

Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 1 passed, 1 total

Is this successful?

Upgrade React version

Hi, this example has become a bit stale. I'm hoping someone can help modernize this example to help others during Hacktoberfest. If it doesn't happen, that is okay, but maybe this can be a good chance for someone to participate. I'm making several tickets to help break this up into chunks. I'm happy to help people, but I don't have much time to re-write this code.

It would be really helpful for someone to upgrade this to the current version of React.

jest - console.error node_modules/fbjs/lib/warning.js:33

The error below is returned when running jest

PASS reactTests/tests/teamAmerica.test.js
โœ“ test to see if the team renders correctly (22ms)

Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 1 passed, 1 total
Time: 1.451s
Ran all test suites.
console.error node_modules/fbjs/lib/warning.js:33
Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `TeamAmerica`. See https://fb.me/react-warning-keys for more information.
    in div (created by TeamAmerica)
    in TeamAmerica

Remove redux

This example is very convoluted due to some decisions made several years ago. I think it would be great to just remove redux. I also don't think we need the server, but that can be a separate ticket.

Add example on how to mock dynamic imports in jest

Dynamic imports (import("foo").then(foo => foo("bar")).catch(()=>console.log("import error")) are actually not supported in Node. As I understand it, these are transpiled to CommonJS imports before running the tests. There may be a need to help people understand how to mock success and failure of these imports in their jest tests.

Upgrade Jest

The version of Jest in this repo is at least 5 years old. It would be very helpful if someone were to upgrade it.

jest not work

jest

FAIL reactTests/tests/teamAmerica.test.js
โ— Test suite failed to run

Cannot find module 'react/lib/ReactComponentTreeHook' from 'ReactDebugTool.js'
  
  at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
  at Object.<anonymous> (node_modules/react-test-renderer/lib/ReactDebugTool.js:16:30)

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.106s
Ran all test suites.
npm ERR! Test failed. See above for more details.

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.