diff --git a/package.json b/package.json index 687c33df..49a51a8b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,8 @@ "mocha": "^2.2.5", "mocha-jshint": "^2.2.3", "node-cpplint": "^0.4.0", - "rimraf": "^2.4.2" + "rimraf": "^2.4.2", + "bufferutil": "^1.2.1" }, "license": "Apache-2.0", "engines": { diff --git a/test/unit/gamma.js b/test/unit/gamma.js index b109e28e..5cf36d52 100755 --- a/test/unit/gamma.js +++ b/test/unit/gamma.js @@ -16,7 +16,7 @@ describe('Gamma correction', function() { assert.strictEqual('jpeg', info.format); assert.strictEqual(129, info.width); assert.strictEqual(111, info.height); - fixtures.assertSimilar(fixtures.expected('gamma-0.0.jpg'), data, done); + fixtures.assertSimilar(fixtures.expected('gamma-0.0.jpg'), data, {threshold: 12}, done); }); }); diff --git a/test/unit/require.js b/test/unit/require.js new file mode 100644 index 00000000..e195e5a1 --- /dev/null +++ b/test/unit/require.js @@ -0,0 +1,15 @@ +'use strict'; + +describe('Require-time checks', function() { + + /* + Including sharp alongside another C++ module that does not require + -stdlib=libc++ (for its C++11 features) has caused clang/llvm to + segfault due to the use of static function variables. + */ + it('Require alongside C++ module that does not use libc++', function() { + var bufferutil = require('bufferutil'); + var sharp = require('../../index'); + }); + +});