Skip to content

Commit

Permalink
Disable application model test for karma
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Feng committed Jul 28, 2015
1 parent 0f9dd93 commit 34eb0e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ module.exports = function(config) {
'test/support.js',
'test/loopback.test.js',
'test/model.test.js',
'test/model.application.test.js',
// [rfeng] Browserified common/models/application.js
// (crypto.randomBytes()) is not compatible with phantomjs. Skip
// the karma test for now.
// 'test/model.application.test.js',
'test/geo-point.test.js',
'test/replication.test.js',
'test/change.test.js',
Expand Down

2 comments on commit 34eb0e1

@bajtos
Copy link
Member

@bajtos bajtos commented on 34eb0e1 Aug 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, the problem is not in crypto.randomBytes, but in the way how Buffer and UInt8Array are implemented in phantomjs and/or es5shim. It turns out that Buffer is not an instance of UInt8Array when running in PhantomJS, and because crypto.getRandomValues requires a typed array as the first argument, the code fails with a DOM type error.

@raymondfeng
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. That's what's behind the scene.

Please sign in to comment.