Giter Site home page Giter Site logo

Comments (4)

ifandelse avatar ifandelse commented on August 18, 2024

@webpro - I knew this day would come. :-) Ultimately, it seems like it's a wise move to run the specs against the concatenated build (and thus, public API). I've been testing the src files directly in order to test private behavior that wouldn't be accessible from the postal namespace. But with what we've discussed about where things are headed (custom builds, moving the fluent SubscriptionDefinition options out to an add-on that treats them like "Strategies" you can apply to a subscription, etc., then we're effectively reducing the surface area of "private code" inside the namespace and that's probably a good thing. thoughts?

from postal.js.

webpro avatar webpro commented on August 18, 2024

The general consensus is indeed to unit test only the public API iirc.

But it depends on the situation, sometimes I want to (unit/perf) test specific internal things. Usually this is still possible if things are organized well in modules. But I guess it's best to see how things work out by testing only the public interface. If that's not sufficient, then I'm happy to take another look.

from postal.js.

ifandelse avatar ifandelse commented on August 18, 2024

@webpro I'm trying to take some time today and tomorrow to look into some of this. I'd definitely like to move to public-API-only tests....will keep you posted

from postal.js.

ifandelse avatar ifandelse commented on August 18, 2024

I'm such a dummy! :-) Apparently, I moved to testing the built output some time ago. That's what happens when your brain goes to mush from no sleep.

from postal.js.

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.