File tree 1 file changed +7
-3
lines changed 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ let assert = require("assert");
5
5
// Library we're testing
6
6
let jsondiff = require ( "../index.js" ) ;
7
7
// json0 transform to work out if the right transform is being created
8
- let json0 = require ( "ot-json0/lib/json0 " ) ;
8
+ let json0 = require ( "ot-json0" ) ;
9
9
// Assertion expectations
10
10
let expect = require ( "chai" ) . expect ;
11
11
// Library for computing differences between strings
@@ -244,8 +244,8 @@ describe("Jsondiff", function() {
244
244
start : "one" ,
245
245
end : "two" ,
246
246
expectedCommand : [
247
- { sd : "one" , p : [ ] } ,
248
- { si : "two" , p : [ ] }
247
+ { sd : "one" , p : [ 0 ] } ,
248
+ { si : "two" , p : [ 0 ] }
249
249
]
250
250
} ,
251
251
{
@@ -305,6 +305,10 @@ describe("Jsondiff", function() {
305
305
it ( test . name , function ( ) {
306
306
let output = jsondiff ( test . start , test . end , diffMatchPatch ) ;
307
307
expect ( output ) . to . deep . equal ( test . expectedCommand ) ;
308
+
309
+ // Test actual application of the expected command.
310
+ let appliedEnd = json0 . type . apply ( test . start , test . expectedCommand ) ;
311
+ expect ( appliedEnd ) . to . deep . equal ( test . end ) ;
308
312
} ) ;
309
313
} ) ;
310
314
} ) ;
You can’t perform that action at this time.
0 commit comments