mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
25 lines
866 B
JavaScript
25 lines
866 B
JavaScript
|
module.exports.addTests = function({testRunner, expect, product}) {
|
||
|
const {describe, xdescribe, fdescribe} = testRunner;
|
||
|
const {it, fit, xit} = testRunner;
|
||
|
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||
|
|
||
|
describe('Chromium-specific tests', function() {
|
||
|
describe('Browser.version', function() {
|
||
|
xit('should return whether we are in headless', async({browser}) => {
|
||
|
const version = await browser.version();
|
||
|
expect(version.length).toBeGreaterThan(0);
|
||
|
expect(version.startsWith('Headless')).toBe(headless);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
describe('Browser.userAgent', function() {
|
||
|
it('should include WebKit', async({browser}) => {
|
||
|
const userAgent = await browser.userAgent();
|
||
|
expect(userAgent.length).toBeGreaterThan(0);
|
||
|
expect(userAgent).toContain('WebKit');
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
};
|
||
|
|