Thursday, 8 June 2017

Aurelia e2e: Expected an identifier and instead saw '='. jshint

This might seem incredibly obvious but I'm running a project using Protractor and I'm after switching to Gulp to run the files, since I've switched over, I've been getting this error that I didn't get previously

Expected an identifier and instead saw '='.

This is the snippet of code from the page object file

checkCurrency (text, userCurrency) {
    let currencyPromise = new Promise(function (resolve, reject) {
    const commonUtils = new CommonUtils();
    var checkFunds = element(by.className("funds"));
      checkFunds.getText().then(function (text) {
        if (text.indexOf("EUR") >== 0 &&& text.indexOf("USD") === -1 &&& text.indexOf("GBP") === -1){
          expect($$("account").count()).toBe(0)
          console.log("You have a EURO account");
        }

The error is to do with the lineif (text.indexOf("EUR") >== 0 &&& text.indexOf("USD") === -1 &&& text.indexOf("GBP") === -1){

I'm slightly stumped as this was working for me before I moved over to Gulp and it isn't working now Thanks



via James

No comments:

Post a Comment