File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ exports.ICON_FILE = "test/.resources/favicon.ico";
2929exports . VIDEO_URL = "http://res.cloudinary.com/demo/video/upload/dog.mp4" ;
3030exports . IMAGE_URL = "http://res.cloudinary.com/demo/image/upload/sample" ;
3131
32+ const { TEST_TAG } = require ( './testUtils/testConstants' ) . TAGS ;
33+
3234exports . SAMPLE_VIDEO_SOURCES = [
3335 {
3436 type : 'mp4' ,
@@ -229,10 +231,16 @@ exports.setupCache = function () {
229231} ;
230232
231233/**
232- Upload an image to be tested on.
233- @callback the callback receives the public_id of the uploaded image
234- */
235- exports . uploadImage = function ( options ) {
234+ * Upload an image to be tested on.
235+ *
236+ * @param {object } options Optional options to use when uploading the test image
237+ * @returns {object } A response object returned from the upload API
238+ */
239+ exports . uploadImage = function ( options = { } ) {
240+ // Ensure that options at the very least contains the TEST_TAG
241+ options . tags = options . tags || [ ] ;
242+ if ( ! options . tags . includes ( TEST_TAG ) ) options . tags . push ( TEST_TAG ) ;
243+
236244 return cloudinary . v2 . uploader . upload ( exports . IMAGE_FILE , options ) ;
237245} ;
238246
You can’t perform that action at this time.
0 commit comments