Comments (4)
@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.
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.
@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.
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)
- How to publish data between Node.js modules? HOT 2
- Bower Release v2.0.5
- Competing consumers HOT 1
- Help improve the quality of the DefinitelyTyped (TypeScript) definitions
- postal.preserve: Still taking a ConduitJS dependency HOT 2
- Default Subscriber
- Stack overflow in IE 11 when publish called on channel with many pending unsubscribes
- Shouldn't postal.channel() implement the Singleton pattern? HOT 2
- Subscriber callback method can brake calling other subscribers HOT 1
- Devtools extension for Chrome
- Messages published inside a subscriber won't be passed to uncached subscribers
- why cache only for result === true
- postal.lodash.js Error: Module name "lodash/after" has not been loaded
- Is this project still active? HOT 6
- Wait for messages to be delivered and processed in unit tests
- timeStamp in envelope should honor timezone
- Timestamp missing on wireTap envelopes
- Thank you
- Regarding publish and subscribe, Important question
- How does postal.js support replay?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postal.js.