sync/test/ffmpeg.js

17 lines
530 B
JavaScript
Raw Normal View History

2017-01-06 05:04:15 +00:00
const assert = require('assert');
const ffmpeg = require('../lib/ffmpeg');
const Config = require('../lib/config');
describe('ffmpeg', () => {
describe('#query', () => {
it('rejects plain http links', done => {
Config.set('ffmpeg.enabled', true);
ffmpeg.query('http://foo.bar/baz.mp4', err => {
assert(/begins with 'https:/.test(err),
`Expected error due to plain HTTP but got "${err}"`);
done();
});
});
});
});