animated-gif-detector
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "animated-gif-detector", | ||
"version": "0.1.0", | ||
"description": "animated-gif-detector --- Detect animated GIFs from JavaScript buffers.", | ||
"version": "0.1.1", | ||
"description": "Detect animated GIFs from JavaScript buffers.", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "directories": { |
@@ -91,2 +91,21 @@ var path = require('path') | ||
t.end(); | ||
}); | ||
test('sync => false (non-GIF)', function(t) { | ||
var filePath = path.join(process.cwd(), 'test', 'files', '240px-Felis_silvestris_silvestris_small_gradual_decrease_of_quality.png'); | ||
var buffer = fs.readFileSync(filePath); | ||
t.notOk(new A().sync(buffer), 'is NOT animated'); | ||
t.end(); | ||
}); | ||
test('sync => false (non-image)', function(t) { | ||
var filePath = path.join(process.cwd(), 'test', 'files', 'file.txt'); | ||
var buffer = fs.readFileSync(filePath); | ||
t.notOk(new A().sync(buffer), 'is NOT animated'); | ||
t.end(); | ||
}); | ||
test('sync => false (non-buffer)', function(t) { | ||
t.notOk(new A().sync({foo: 'bar' }), 'is NOT animated'); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
957640
13
130