pdf-powerpoint
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -62,3 +62,3 @@ 'use strict' | ||
}) | ||
this.options = _.extend({}, defaultOptions, options) | ||
this.options = _.merge({}, defaultOptions, options) | ||
process.nextTick(() => { | ||
@@ -65,0 +65,0 @@ this.emit('options', { output: JSON.stringify(this.options) }) |
{ | ||
"name": "pdf-powerpoint", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Converts one or more PDFs into a powerpoint with one pdf page per slide", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,34 @@ import {test} from 'ava' | ||
test('Uses default slide dimensions if they are passed in undefined', t => { | ||
var dimensions = { | ||
height: undefined, | ||
width: undefined, | ||
type: undefined | ||
} | ||
let p = new Powerpoint({dimensions}) | ||
t.is(p.options.dimensions.width, 800) | ||
t.is(p.options.dimensions.height, 600) | ||
t.is(p.options.dimensions.type, 'screen4x3') | ||
}) | ||
test('Uses slide dimensions if they are passed as options', t => { | ||
var dimensions = { | ||
height: 1000 | ||
} | ||
let p = new Powerpoint({dimensions}) | ||
t.is(p.options.dimensions.width, 800) | ||
t.is(p.options.dimensions.height, 1000) | ||
t.is(p.options.dimensions.type, 'screen4x3') | ||
}) | ||
test('sets cropLastImage to false for backwards compatibility', t => { | ||
let p = new Powerpoint() | ||
t.is(p.options.cropLastImage, false) | ||
}) | ||
test('allows cropLastImage to be set in config', t => { | ||
let p = new Powerpoint({cropLastImage: true}) | ||
t.is(p.options.cropLastImage, true) | ||
}) | ||
test('Convert options do not allow density > 300', t => { | ||
@@ -20,0 +52,0 @@ const o = p._getConvertOptions({ convertOptions: { 'density': 600 } }) |
106015
392