Browser version test (#152)

This patch adds a test for Browser.version()

References #50.
This commit is contained in:
JoelEinbinder 2017-07-27 11:32:58 -07:00 committed by Andrey Lushnikov
parent cfc6a6ab38
commit dd1459b733

View File

@ -81,6 +81,14 @@ describe('Puppeteer', function() {
await page.close();
}));
describe('Browser.version', function() {
it('should return whether we are in headless', SX(async function() {
let version = await browser.version();
expect(version.length).toBeGreaterThan(0);
expect(version.startsWith('Headless')).toBe(headless);
}));
});
describe('Page.evaluate', function() {
it('should work', SX(async function() {
let result = await page.evaluate(() => 7 * 3);