snowplow / snowplow-lua-tracker

Snowplow event tracker for Lua. Add analytics to your Lua apps and Lua-scripted games
http://snowplowanalytics.com
4 stars 3 forks source link

Refactor architecture so can unit test querystrings without spys and hardcoded transaction IDs #4

Closed alexanderdean closed 2 years ago

alexanderdean commented 11 years ago

Reference: https://github.com/piwik/piwik-java-tracking/blob/master/src/test/java/org/piwik/SimplePiwikTrackerTest.java

If we create new pure functions buildUnstructEventPayload etc, then we can verify they build the right stuff without needing spies.

and then we can handle any random transaction id (and possibly random dtm), rather than having to create a "magic" transaction id.

The whole thing will be a lot cleaner...

AlexBenny commented 2 years ago

Closing because part of the test rewriting for v0.2