Opened 3 years ago

Last modified 5 months ago

#4796 closed change

Use a modern JS engine in the browser tests — at Version 3

Reported by: fhd Assignee:
Priority: P2 Milestone:
Module: Core Keywords:
Cc: trev, kzar, hfiguiere, sergz Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29423569/

Description (last modified by kzar)

Background

As of #4726, we have automated browser tests in Core. We are using PhantomJS 2.1.7 for these, which is based on a version of WebKit that doesn't support ECMAScript 2015 features (such as let).

What to change

  • Use PhantomJS 2.5 for our tests once it is available.
  • Remove the following files from adblockpluscore/.eslintignore and update those files so that linting passes: chrome/content/elemHideEmulation.js, lib/common.js and test/browser/elemHideEmulation.js.
  • Remove the comments that mention this issue.

Change History (3)

comment:1 Changed 3 years ago by fhd

How I see it, we have three options for dealing with this:

  1. We wait. PhantomJS 2.5 is currently in beta and has full ES2015 support. Shouldn't take that much longer for them to release this now.
  1. We switch to a different headless browser that has better ES2015 support. Based on some quick research I haven't seen anything promising, but there could be something.
  1. We transpile all the code used in browser tests to ES2015, e.g. using Babel.

I'm a big fan of #1, hence I will not mark the issue as Ready at this time.

comment:2 Changed 3 years ago by trev

  • Description modified (diff)
  • Priority changed from Unknown to P5
  • Ready set

I agree, just waiting for PhantomJS 2.5 looks like the best solution to me.

comment:3 Changed 3 years ago by kzar

  • Cc trev kzar added
  • Description modified (diff)
  • Keywords externaldependency added
Note: See TracTickets for help on using tickets.