What happened
@WebReflection the following test case in Jest:
it('should be the same <body /> element', () => {
const { document } = parseHTML(`<body><div class="whatever"></div></body>`);
const body = document.querySelector('body'),
expect(body).toBe(document.body);
});
outputs this kind of result:
- Expected - 0
+ Received + 6
+ <body>
+ <head />
<body />
+ <div
+ class="whatever"
+ />
+ </body>
Real world
https://github.com/freeCodeCamp-China/article-webpage-to-markdown-action/pull/32/files#diff-5cdb43bc3113537f238168168c0a52ab488039b63c51cbfc7938b22a2b589c53