GithubHelp home page GithubHelp logo

Unit tests for dispatcher? about flux HOT 5 CLOSED

facebook avatar facebook commented on April 25, 2024
Unit tests for dispatcher?

from flux.

Comments (5)

fisherwebdev avatar fisherwebdev commented on April 25, 2024

I can port over Facebook's internal tests, I think. Let's keep this issue open until I get that done.

from flux.

sompylasar avatar sompylasar commented on April 25, 2024

@fisherwebdev The tests expect the Dispatcher with waitFor taking 2nd argument:
83a9505#diff-e0947f38df5ab3cb5b2137999fb1a23cR141

The Dispatcher in the repo does not match this signature, it takes a single argument:
https://github.com/facebook/flux/blob/master/src/Dispatcher.js#L154

from flux.

fisherwebdev avatar fisherwebdev commented on April 25, 2024

I'm not sure what those tests are trying to do. I copied these over from our internal tests, but these don't make sense. I also can't find any history in our internal code of some legacy version of the dispatcher having these second arguments. I'll ask around at FB about this, but for now I'm going to pull out those tests.

from flux.

fisherwebdev avatar fisherwebdev commented on April 25, 2024

Did not pull out the tests, but rather simply fixed them to take the correct arguments. These are the tests that make sure the dispatcher throws an error if you create a circular dependency -- very important.

from flux.

sterpe avatar sterpe commented on April 25, 2024

@fisherwebdev Thanks! didn't see this.

from flux.

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.