-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[2.0] Fix loopback in PhantomJS, fix karma tests #344
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,4 @@ | |
| *.swo | ||
| node_modules | ||
| dist | ||
| *xunit.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| // Karma configuration | ||
| // http://karma-runner.github.io/0.12/config/configuration-file.html | ||
|
|
||
| module.exports = function(config) { | ||
| config.set({ | ||
| // enable / disable watching file and executing tests whenever any file changes | ||
| autoWatch: true, | ||
|
|
||
| // base path, that will be used to resolve files and exclude | ||
| basePath: '../', | ||
|
|
||
| // testing framework to use (jasmine/mocha/qunit/...) | ||
| frameworks: ['mocha', 'browserify'], | ||
|
|
||
| // list of files / patterns to load in the browser | ||
| files: [ | ||
| 'node_modules/es5-shim/es5-shim.js', | ||
| 'test/support.js', | ||
| 'test/model.test.js', | ||
| 'test/geo-point.test.js', | ||
| 'test/app.test.js' | ||
| ], | ||
|
|
||
| // list of files / patterns to exclude | ||
| exclude: [ | ||
| ], | ||
|
|
||
| // test results reporter to use | ||
| // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' | ||
| reporters: ['dots'], | ||
|
|
||
| // web server port | ||
| port: 9876, | ||
|
|
||
| // cli runner port | ||
| runnerPort: 9100, | ||
|
|
||
| // Start these browsers, currently available: | ||
| // - Chrome | ||
| // - ChromeCanary | ||
| // - Firefox | ||
| // - Opera | ||
| // - Safari (only Mac) | ||
| // - PhantomJS | ||
| // - IE (only Windows) | ||
| browsers: [ | ||
| 'Chrome' | ||
| ], | ||
|
|
||
| // Which plugins to enable | ||
| plugins: [ | ||
| 'karma-browserify', | ||
| 'karma-mocha', | ||
| 'karma-phantomjs-launcher', | ||
| 'karma-chrome-launcher', | ||
| 'karma-junit-reporter' | ||
| ], | ||
|
|
||
| // If browser does not capture in given timeout [ms], kill it | ||
| captureTimeout: 60000, | ||
|
|
||
| // Continuous Integration mode | ||
| // if true, it capture browsers, run tests and exit | ||
| singleRun: false, | ||
|
|
||
| colors: true, | ||
|
|
||
| // level of logging | ||
| // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG | ||
| logLevel: config.LOG_INFO, | ||
|
|
||
| // Uncomment the following lines if you are using grunt's server to run the tests | ||
| // proxies: { | ||
| // '/': 'http://localhost:9000/' | ||
| // }, | ||
| // URL root prevent conflicts with the site root | ||
| // urlRoot: '_karma_' | ||
|
|
||
| // Browserify config (all optional) | ||
| browserify: { | ||
| // extensions: ['.coffee'], | ||
| ignore: [ | ||
| 'nodemailer', | ||
| 'passport', | ||
| 'passport-local', | ||
| 'superagent', | ||
| 'supertest' | ||
| ], | ||
| // transform: ['coffeeify'], | ||
| debug: true, | ||
| // noParse: ['jquery'], | ||
| watch: true, | ||
| }, | ||
|
|
||
| // Add browserify to preprocessors | ||
| preprocessors: {'test/*': ['browserify']} | ||
| }); | ||
| }; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this breaking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK it is not breaking. This check is preventing the following situation:
descis not defined when thekeyis not an own property of thesource. MDN on getOwnPropertyDescriptor:What happens in PhantomJS:
for (var key in source)enumerates overbindfunctionbindfunction is not an own property,getOwnPropertyDescriptorreturns undefinedObject.definePropertythrows when the descriptor is not defined