mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-13 00:44:25 +00:00
32 lines
565 B
JavaScript
32 lines
565 B
JavaScript
|
suite('DisplayProcess', function() {
|
||
|
var sut;
|
||
|
|
||
|
setup(function(){
|
||
|
wdi.Debug.debug = false; //disable debugging, it slows tests
|
||
|
});
|
||
|
|
||
|
suite('#processPacket()', function() {
|
||
|
setup(function() {
|
||
|
|
||
|
|
||
|
|
||
|
wdi.ExecutionControl.sync = true;
|
||
|
});
|
||
|
|
||
|
test('displayRouter packetProcess should execute the correct route', sinon.test(function() {
|
||
|
var executed = false;
|
||
|
sut = new wdi.DisplayRouter({
|
||
|
routeList: {
|
||
|
45: function() {
|
||
|
executed = true;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
sut.processPacket({messageType:45});
|
||
|
assert.isTrue(executed);
|
||
|
}));
|
||
|
|
||
|
});
|
||
|
});
|