You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thumbsup/test/fixtures.js

46 lines
880 B
JavaScript

var File = require('../src/model/file');
exports.metadata = function() {
return {
fileDate: new Date(),
mediaType: 'image',
exif: {
date: null,
orientation: 1,
caption: ''
}
};
};
exports.date = function(str) {
return new Date(Date.parse(str));
};
exports.photo = function(opts) {
opts = opts || {};
var date = opts.date ? new Date(Date.parse(opts.date)) : new Date();
return new File(opts.path || 'tmp', {
fileDate: date,
mediaType: 'image',
exif: {
date: null,
orientation: 1,
caption: ''
}
});
};
exports.video = function(opts) {
opts = opts || {};
var date = opts.date ? new Date(Date.parse(opts.date)) : new Date();
return new File(opts.path || 'tmp', {
fileDate: date,
mediaType: 'video',
exif: {
date: null,
orientation: 1,
caption: ''
}
});
};