Giter Site home page Giter Site logo

Redux Test Suite Expansion about mycrypto HOT 4 CLOSED

dternyak avatar dternyak commented on August 20, 2024
Redux Test Suite Expansion

from mycrypto.

Comments (4)

dternyak avatar dternyak commented on August 20, 2024 1

from mycrypto.

bfillmer avatar bfillmer commented on August 20, 2024

General coverage improvements or....?

from mycrypto.

bfillmer avatar bfillmer commented on August 20, 2024

WIP @ https://github.com/MyEtherWallet/MyEtherWallet/tree/redux-test-improvements

@dternyak One improvement to consider is leveraging snapshot testing for these. Effectively replace defining expected results with snapshots that are auto-generated. Example: https://github.com/bfillmer/todo-and-tonic/blob/master/src/state/reducers/todos.spec.js

When iterating on the test the first time through you update the snapshot until you see the state you expect, then leave it. In the future if any code changes would affect the state shape the snapshots won't match up and Jest will let you know. If it's an expected change you can simply update the snapshot, if not then you know to start digging into the issue.

from mycrypto.

dternyak avatar dternyak commented on August 20, 2024

I've heard good things about snapshot testing as well. Seems like a good approach for getting an initial layer of tests going 👍

from mycrypto.

Related Issues (20)

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.