Fix expected test outputs

This commit is contained in:
Tony Garnock-Jones 2016-08-07 22:44:56 -04:00
parent 31ee867964
commit a55dc6ec58
3 changed files with 12 additions and 26 deletions

View File

@ -16,9 +16,8 @@ function checkPrettyTrie(m, expected) {
function checkPrettyPatch(p, expectedAdded, expectedRemoved) {
expect(p.pretty()).to.equal(
('<<<<<<<< Removed:\n' + expectedRemoved.join('\n') + '\n' +
'======== Added:\n' + expectedAdded.join('\n') + '\n' +
'>>>>>>>>'));
('\n-' + expectedRemoved.join('\n-') +
'\n+' + expectedAdded.join('\n+') + '\n'));
}
function getM() {

View File

@ -11,9 +11,8 @@ var _$ = Trie._$;
function checkPrettyPatch(p, expectedAdded, expectedRemoved) {
expect(p.pretty()).to.equal(
('<<<<<<<< Removed:\n' + expectedRemoved.join('\n') + '\n' +
'======== Added:\n' + expectedAdded.join('\n') + '\n' +
'>>>>>>>>'));
('\n-' + expectedRemoved.join('\n-') +
'\n+' + expectedAdded.join('\n+') + '\n'));
}
describe('basic patch compilation', function () {

View File

@ -65,11 +65,8 @@ describe("configurationTrace", function() {
});
Dataspace.send(123);
Dataspace.send(234);
}, ['<<<<<<<< Removed:\n'+
' ::: nothing\n'+
'======== Added:\n'+
' observe<1> ★ {[0]}\n'+
'>>>>>>>>',
}, ['\n- ::: nothing'+
'\n+ observe<1> ★ {[0]}\n',
Syndicate.message(123),
Syndicate.message(234)]);
});
@ -88,11 +85,8 @@ describe("nonempty initial routes", function () {
boot: function () { return Patch.sub(["A", __]); },
handleEvent: traceEvent(trace)
});
}, ['<<<<<<<< Removed:\n'+
' ::: nothing\n'+
'======== Added:\n'+
' <2> "A" ★ {[0]}\n'+
'>>>>>>>>']);
}, ['\n- ::: nothing'+
'\n+ <2> "A" ★ {[0]}\n']);
});
});
@ -108,16 +102,10 @@ describe("nested actor with an echoey protocol", function () {
handleEvent: traceEvent(trace)
});
}));
}, ['<<<<<<<< Removed:\n'+
' ::: nothing\n'+
'======== Added:\n'+
' at-meta<1> "X" {["meta"]}\n'+
'>>>>>>>>',
'<<<<<<<< Removed:\n'+
' at-meta<1> "X" {["meta"]}\n'+
'======== Added:\n'+
' ::: nothing\n'+
'>>>>>>>>']);
}, ['\n- ::: nothing'+
'\n+ at-meta<1> "X" {["meta"]}\n',
'\n- at-meta<1> "X" {["meta"]}'+
'\n+ ::: nothing\n']);
})
it("shouldn't see an echoed message", function () {
checkTrace(function (trace) {