Closed Bug 1310075 Opened 6 years ago Closed 6 years ago

Tests for qq.com

Categories

(Toolkit :: Reader Mode, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: evanxd, Assigned: evanxd)

References

(Blocks 1 open bug)

Details

Write tests for qq.com web pages.
Assignee: nobody → evan
Added tests for qq.com[1], but there are some errors for the patch. The failure is interesting. It doesn't occur with JSDOMParser, but occurs with jsdom.

The error message:
```
  Test pages
    qq
      jsdom
        ✓ should return a result object
        1) should extract expected content
        ✓ should extract expected title
        ✓ should extract expected byline
        ✓ should extract expected excerpt
        ✓ should probably be readerable
      JSDOMParser
        ✓ should return a result object
        ✓ should extract expected content
        ✓ should extract expected title
        ✓ should extract expected byline
        ✓ should extract expected excerpt
        ✓ should probably be readerable


  11 passing (438ms)
  1 failing

  1) Test pages qq jsdom should extract expected content:

      AssertionError: expected true to deeply equal false
      + expected - actual

      -true
      +false
      
      at Assertion.assertEql (node_modules/chai/lib/chai/core/assertions.js:473:10)
      at Assertion.ctx.(anonymous function) [as eql] (node_modules/chai/lib/chai/utils/addMethod.js:40:25)
      at test/test-readability.js:94:30
      at traverseDOM (test/test-readability.js:39:10)
      at Context.<anonymous> (test/test-readability.js:93:7)
```

Continue to fix the errors...

[1]: https://github.com/evanxd/readability/commit/a447bc33bf0bb69fc412b33a77b57056f1e99327
Fixed the issues and sent a pull request for review[1].

The test page is from [2].

[1]: https://github.com/mozilla/readability/pull/316
[2]: http://tech.qq.com/a/20161014/006270.htm
landed: https://github.com/mozilla/readability/commit/1b694cf650be49aa87452f69ea58122d8badd421
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.