Wercker/PhantomJS продолжает терпеть неудачу в моем проекте Ember во время тестов

Я продолжаю получать эти ошибки, пока Веркер выполняет мои тесты.

not ok 1 PhantomJS 2.1 - Global error: SyntaxError: Unexpected token ')' at    http://localhost:7357/assets/vendor.js, line 15740
---
    Log: |
        { type: 'error',
          text: 'SyntaxError: Unexpected token \')\' at http://localhost:7357/assets/vendor.js, line 15740\n' }
...
not ok 2 PhantomJS 2.1 - Global error: Error: Could not find module ember-metal/core required by: ember-testing/index at http://localhost:7357/assets/test-support.js, line 62
---
    Log: |
        { type: 'error',
          text: 'Error: Could not find module ember-metal/core required by: ember-testing/index at http://localhost:7357/assets/test-support.js, line 62\n' }
...
not ok 3 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: define at http://localhost:7357/assets/frontend.js, line 9
---
    Log: |
        { type: 'error',
          text: 'ReferenceError: Can\'t find variable: define at http://localhost:7357/assets/frontend.js, line 9\n' }
...
not ok 4 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: define at http://localhost:7357/assets/tests.js, line 3
---
    Log: |
        { type: 'error',
          text: 'ReferenceError: Can\'t find variable: define at http://localhost:7357/assets/tests.js, line 3\n' }
...
not ok 5 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: EmberENV at http://localhost:7357/5866/tests/index.html?hidepassed, line 44
---
    Log: |
        { type: 'error',
          text: 'ReferenceError: Can\'t find variable: EmberENV at http://localhost:7357/5866/tests/index.html?hidepassed, line 44\n' }
...

Когда я запускаю свои тесты в своем проекте ember с помощью, тесты проходят.

тлеющий тест

Только в Wercker и использовании PhantomJS тесты не проходят. Я предполагаю, что это как-то связано с тем, что PhantomJS не поддерживает ES6? Но в моем .jshintrc я добавил эту строку:

"esversion": 6,

Есть ли способ пройти эти тесты?


Это мои шаги в wercker.yml:

steps:
- script:
  name: yarn-install
  code: npm install -g yarn

- script:
  name: bower-install
  code: yarn global add bower

- script:
  name: phantomjs-prebuilt-install
  code: yarn global add phantomjs-prebuilt

- script:
  name: ember-cli
  code: yarn global add ember-cli

# A step that executes `npm install` command
- script:
  name: install-deps
  code: yarn install

- script:
  name: bower-install-deps
  code: bower install --allow-root

- script:
  name: tests
  code: ember test

- script:
  name: ember-build
  code: ember build

person Driezzz    schedule 10.02.2017    source источник


Ответы (1)


Изменение версии phantomjs на 1.9, похоже, решает проблему на данный момент.

- script:
 name: phantomjs-prebuilt-install
 code: yarn global add phantomjs-prebuilt

to:

- script:
 name: phantomjs-prebuilt-install
 code: yarn global add [email protected]
person Driezzz    schedule 20.02.2017