That's interesting. Here's my test page:
<html>
<head><title>Vanity Fair - Entertainment, Politics, and Fashion News</title></head>
<body>Test Page</body>
</html>
And here's the test:
import { Selector } from 'testcafe';
fixture('Test Title') // declare the fixture
.page('http://localhost:8080/test.html')
test('Title', async t => {
await t
.expect(Selector("title").innerText).eql('Vanity Fair - Entertainment, Politics, and Fashion News')
});
And here's the output:
