Skip to content

Tests fail for EditScriptSuite #8

@jbeard4

Description

@jbeard4
> diffxml-js@1.3.0 test /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js
> mocha



  EditScriptSuite
    Test handling documents with different document elements
      1) nonMatchingDocumentElements
    Test handling differences in prolog
      2) differentProlog
    Test the simple addition of an element
      3) simpleInsert
    Test the simple deletion of an element
      4) simpleDeletion
    Test the simple move of an element
      5) simpleMove
    Test insert after text
      6) insertAfterText
    Test mis-aligned nodes
      7) misalignedNodes
    Test inserting and moving where marked order of nodes is important
      8) ordering
    Test for irritating bug where unmatched node breaks text
      9) numberingBug
    Test for DocumentType node handling. Note DocumentType nodes can't be differenced, as can't be referenced by XPath
      10) documentType

  FindPositionSuite
    FindPositionTest
      ✓ FindPositionTest 
    Test where no leftmost match.
      ✓ simpleInsert 
    Test inserting a node after text with a leftmost match.
      ✓ insertingAfterText 

  MatchSuite
    Just make sure a simple identical document with only elements matches correctly.
      ✓ testSimpleIdenticalDoc 
    Now test identical doc with comments and text matches correctly.
      ✓ testIdenticalDocWithTextAndComments 
    Test completely different docs - only root nodes should match.
      ✓ testDifferentDocs 
    Test similar documents match partly.
      ✓ testSimilarDocs 
    Test documents with same elements but in different order match completely.
      ✓ testDifferentOrdering 
    Test elements with different attributes don't match.
      ✓ testElementsWithDiffAttrs 
    Test elements with different attributes aren't matched.
      ✓ testDifferingAttributes 

  NodeDepth
    Test calculating depth of nodes in document.
      ✓ testCorrectDepthCalculated 

  NodeFifo
    Test an empty fifo is empty.
      ✓ testEmptyFifo 
    Test nodes are pushed and popped in the right order.
      ✓ testPushPopOrder 
    Test that children of a node are added in the correct order.
      ✓ testAddChildrenOfNode 

  NodeOps
    Test getting the unique XPath for nodes.
      ✓ testGetXPath 
    testGetXPathWithTextNodes
      ✓ testGetXPathWithTextNodes 
    Test getting XPath for attributes.
      ✓ testGetXPathForAttributes 
    Test getting XPath with namespaced element.
      ✓ testGetXPathWithNamespace 
    Test check for blank text nodes.
      ✓ testCheckForBlankText 
    Test getXPath with comment in prolog.
      ✓ testGetXPathWithCommentProlog 
    Test handling of newlines in text nodes.
      ✓ testNewlineIsNotEmpty 
    Test getting XPath with spaced text nodes.
      ✓ testGetXPathWithSpacedText 

  NodePair
    Make sure the correct partner for a node is found.
      ✓ testGetsCorrectPartner 

  NodeSequence
    Test getting sequence with all members in common.
      ✓ testSequenceAllInCommon 
    Test getting a sequence with some in common.
      ✓ testSequenceSomeInCommon 
    Test a sequence with no Nodes in common.
      ✓ testSequenceNoneInCommon 
    Test passing null to getSequence.
      ✓ testSequenceWithNull 
    Test LCS with all Nodes in common.
      ✓ testLCSAllInCommon 
    Test LCS with one Node moved.
      ✓ testLCSNodeMoved 
    Test two sequences separated by a common misplaced element.
      ✓ testLCSWith2Seqs 
    Test two sequences with nothing in common.
      ✓ testLCSWithNoneInCommon 

  PatchTestSuite
    ✓ Simple insert operation 
    ✓ Insert element after text 
    ✓ Insert element before text 
    ✓ Insert element into text 
    ✓ Insert element into text 
    ✓ Test inserting attribute 
    ✓ Test inserting comment 
    ✓ Test inserting CDATA section 
    ✓ Test simple delete operation 
    ✓ Test deleting attribute 
    ✓ Test deleting comment 
    ✓ Test deleting whole text node and part of 
    ✓ Test simple move operation 
    ✓ Test moving into text 
    ✓ Test moving part of text 
    ✓ Test moves don't count moved node 
    ✓ Test update of element 
    ✓ Test update of attribute 
    ✓ Simple insert operation 


  50 passing (100ms)
  10 failing

  1) EditScriptSuite Test handling documents with different document elements nonMatchingDocumentElements:
     AssertionError: 6 == 8
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:22:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  2) EditScriptSuite Test handling differences in prolog differentProlog:
     AssertionError: 6 == 8
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:37:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  3) EditScriptSuite Test the simple addition of an element simpleInsert:
     AssertionError: 6 == 8
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:57:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  4) EditScriptSuite Test the simple deletion of an element simpleDeletion:
     AssertionError: 6 == 8
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:75:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  5) EditScriptSuite Test the simple move of an element simpleMove:
     AssertionError: 10 == 12
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:89:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  6) EditScriptSuite Test insert after text insertAfterText:
     AssertionError: 6 == 8
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:104:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  7) EditScriptSuite Test mis-aligned nodes misalignedNodes:
     AssertionError: "/node()[1]" == "/node()[3]"
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:132:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  8) EditScriptSuite Test inserting and moving where marked order of nodes is important ordering:
     AssertionError: 10 == 12
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:157:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  9) EditScriptSuite Test for irritating bug where unmatched node breaks text numberingBug:
     AssertionError: 10 == 12
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:194:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

  10) EditScriptSuite Test for DocumentType node handling. Note DocumentType nodes can't be differenced, as can't be referenced by XPath documentType:
     AssertionError: 4 == 6
      at Context.<anonymous> (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/test/editscripttest.js:214:16)
      at callFn (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:250:21)
      at Test.Runnable.run (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runnable.js:243:7)
      at Runner.runTest (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:373:10)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:298:14)
      at /Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:246:23)
      at Object._onImmediate (/Users/jbeard4/workspace/jacobean/xmldiff/diffxml-js/node_modules/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:345:15)


npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions