Last active
July 13, 2017 21:30
-
-
Save godber/47783348915c14f9a99b70f35b8cd055 to your computer and use it in GitHub Desktop.
A simple spec file using the new API on the teraslice test harness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var processor = require('../index'); | |
var harness = require('teraslice_op_test_harness')(processor); | |
describe('With data in is []', function() { | |
it('data out is []', function() { | |
expect(harness.run([])).toEqual([]); | |
}); | |
}); | |
describe('The data doubles when', function() { | |
it('using simple data and percentage is 100', function() { | |
expect(harness.run(harness.data.simple)).toEqual(harness.data.simple); | |
}); | |
}); | |
describe('The data doubles when', function() { | |
var opConfig = {percentage: 100}; | |
it('using simple data and percentage is 100', function() { | |
var newData = []; | |
harness.data.simple.forEach(function(item) { | |
newData.push(item, item); | |
}); | |
expect(harness.run(harness.data.simple, opConfig)).toEqual(newData); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment