mardi 6 octobre 2015

Phantomjs failing in ember because it cannot find the variable: google

I am running test on my ember project and it passes successfully when I run it on chrome, but when I run it in the terminal using phantomjs it fails because it Can't find variable: google. In the unit test file I have /*global google*/ which works for the test running in chrome but not the phantomjs test.

This is an example of one of the failed test:

not ok 8 PhantomJS 1.9 - component:street-view: it renders
    ---
        actual: >
            null
        message: >
            Died on test #2     at http://localhost:7357/assets/test-support.js:2934
                at test (http://localhost:7357/assets/test-support.js:1826)
                at http://localhost:7357/assets/dummy.js:395
                at http://localhost:7357/assets/vendor.js:150
                at tryFinally (http://localhost:7357/assets/vendor.js:30)
                at http://localhost:7357/assets/vendor.js:156
                at http://localhost:7357/assets/test-loader.js:29
                at http://localhost:7357/assets/test-loader.js:21
                at http://localhost:7357/assets/test-loader.js:40
                at http://localhost:7357/assets/test-support.js:6647: Can't find variable: google
        Log: |
    ...

I also tried adding google to "predef" in the .jshintrc file, but that also did not work.

Anyone have any possible solution to this?

Aucun commentaire:

Enregistrer un commentaire