Detox: Importing device into test case

Created on 27 Jul 2017  路  3Comments  路  Source: wix/Detox

I need to avoid no-undefined from eslint - we have strict policy regarding this

import device from 'detox'; 

throwing an error

questiostack overflow

Most helpful comment

@aamorozov in your .eslitrc

{
  // ...
  "globals": {
    "device": false,
    "expect": false,
    "waitFor": false,
    "element": false,
    "by": false,
  }
}

All 3 comments

You don't need to import it, it is globally available in the tests. Just remove the import and everything should work just fine

@aamorozov in your .eslitrc

{
  // ...
  "globals": {
    "device": false,
    "expect": false,
    "waitFor": false,
    "element": false,
    "by": false,
  }
}

@isnifer Thank you, that's what I needed

Was this page helpful?
0 / 5 - 0 ratings