Skip to content

Instantly share code, notes, and snippets.

@jwoudenberg
Created November 18, 2015 18:31
Show Gist options
  • Save jwoudenberg/37da02a78f3c347c0cc0 to your computer and use it in GitHub Desktop.
Save jwoudenberg/37da02a78f3c347c0cc0 to your computer and use it in GitHub Desktop.
var dryRun = require('denormalizer-test-utils').dryRun;
var runScene = require('domain-test-utils');
var Denormalizer = require('')
describe('some suite', function () {
var events = null;
var notifications = null;
before(function () {
//In reality, functions below will be async.
events = runScene(commands);
notifications = dryRun(Denormalizer, events);
});
it('has a certain state at a certain point', function () {
var notificationAtPoint = _.find(notifications, { event: 'myEventName' });
var actualVmAtPoint = notificationAtPoint.payload;
var expectedVmAtPoint = { foo: 'bar' };
assert.deepEqual(actualVmAtPoint, expectedVmAtPoint);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment