Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on generated Adapter unit tests #79

Closed
pkenway opened this issue Apr 2, 2015 · 6 comments · Fixed by #89
Closed

Error on generated Adapter unit tests #79

pkenway opened this issue Apr 2, 2015 · 6 comments · Fixed by #89
Assignees
Labels

Comments

@pkenway
Copy link

pkenway commented Apr 2, 2015

I'm getting an error running unit tests for the DRF adapter and subclassed adapters.

See the following gist for an example:
https://gist.github.com/pkenway/9e77ca425d91fe925482

This is the error I get:


not ok 1 PhantomJS 1.9 - ApplicationAdapter: it exists
    ---
        actual: >
            null
        message: >
            beforeEach failed on it exists: 'undefined' is not a function (evaluating '(function () {
                  return ENV['default'].APP.API_HOST;
                }).property()')
        Log: >
    ...
ok 2 PhantomJS 1.9 - JSHint - unit/adapters: unit/adapters/application-test.js should pass jshint

This is with ember-cli 0.2.2.

Am I doing something wrong or is this a bug?

@pkenway
Copy link
Author

pkenway commented Apr 2, 2015

I figured out the issue. I was including the adapter in an addon, which by default has the prototype extensions disabled. I uninstalled ember-disable-prototype-extensions and it's fixed.

@pkenway pkenway closed this as completed Apr 2, 2015
@dustinfarris
Copy link
Owner

Good to know. This sounds like something we should document.

@dustinfarris dustinfarris reopened this Apr 3, 2015
@dustinfarris dustinfarris self-assigned this Apr 3, 2015
@benkonrath
Copy link
Collaborator

Ember-cli 0.2.4 includes ember-disable-prototype-extensions by default so we should probably figure out why the tests don't work when the prototype extensions are turned off.

Here's some information about the module:

This is a great idea for addon authors to ensure that their addon does not accidentally
depend upon prototype extensions (which may be disabled in a consuming application).

https://github.com/rwjblue/ember-disable-prototype-extensions

The PR into ember-cli also has some useful information:
ember-cli/ember-cli#3645

@dustinfarris
Copy link
Owner

Yes, we need to update to 0.2.4 and fix this issue.

@benkonrath
Copy link
Collaborator

Do you want me to investigate / fix this issue before you merge #89?

@dustinfarris
Copy link
Owner

Yes, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants