From d3f5a617474bac10563689f462debfcaaddf623c Mon Sep 17 00:00:00 2001 From: strausr Date: Mon, 20 Jan 2020 17:38:33 +0200 Subject: [PATCH] Remove mp4 image format from dts --- test/api_spec.js | 13 ++++++++----- test/spechelper.js | 1 + test/structured_metadata_spec.js | 4 ++-- types/index.d.ts | 3 +-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/api_spec.js b/test/api_spec.js index 080f6f87..ace7cca1 100644 --- a/test/api_spec.js +++ b/test/api_spec.js @@ -16,7 +16,7 @@ const itBehavesLike = helper.itBehavesLike; const TEST_TAG = helper.TEST_TAG; const UPLOAD_TAGS = helper.UPLOAD_TAGS; const uploadImage = helper.uploadImage; -const TEST_ID = helper.TEST_ID; +const TEST_ID = Date.now(); const SUFFIX = helper.SUFFIX; const PUBLIC_ID_PREFIX = "npm_api_test"; const PUBLIC_ID = PUBLIC_ID_PREFIX + SUFFIX; @@ -47,6 +47,9 @@ const EXPLICIT_TRANSFORMATION2 = { const METADATA_EXTERNAL_ID_UPLOAD = "metadata_upload_" + TEST_ID; const METADATA_EXTERNAL_ID_UPDATE = "metadata_uploader_update_" + TEST_ID; const METADATA_EXTERNAL_ID_EXPLICIT = "metadata_explicit_" + TEST_ID; +const LABEL_INT_1 = 'metadata_label_1_' + TEST_ID; +const LABEL_INT_2 = 'metadata_label_2_' + TEST_ID; +const LABEL_INT_3 = 'metadata_label_3_' + TEST_ID; sharedExamples("a list with a cursor", function (testFunc, ...args) { specify(":max_results", function () { @@ -345,7 +348,7 @@ describe("api", function () { }); }); it("should allow deleting derived resources by transformations", function () { - this.timeout(helper.TIMEOUT_LONG); + this.timeout(helper.TIMEOUT_LARGE); return Q.all([ uploadImage({ public_id: PUBLIC_ID_1, @@ -809,17 +812,17 @@ describe("api", function () { [ cloudinary.v2.api.add_metadata_field({ external_id: METADATA_EXTERNAL_ID_UPDATE, - label: "subject", + label: LABEL_INT_1, type: "string", }), cloudinary.v2.api.add_metadata_field({ external_id: METADATA_EXTERNAL_ID_UPLOAD, - label: "input", + label: LABEL_INT_2, type: "string", }), cloudinary.v2.api.add_metadata_field({ external_id: METADATA_EXTERNAL_ID_EXPLICIT, - label: "field", + label: LABEL_INT_3, type: "string", }), ] diff --git a/test/spechelper.js b/test/spechelper.js index 953f3cf8..bd202723 100644 --- a/test/spechelper.js +++ b/test/spechelper.js @@ -23,6 +23,7 @@ const api_http = String(config().upload_prefix).startsWith('http:') ? http : htt exports.TIMEOUT_SHORT = 5000; exports.TIMEOUT_MEDIUM = 20000; exports.TIMEOUT_LONG = 50000; +exports.TIMEOUT_LARGE = 70000; exports.SUFFIX = process.env.TRAVIS_JOB_ID || Math.floor(Math.random() * 999999); exports.SDK_TAG = "SDK_TEST"; // identifies resources created by all SDKs tests exports.TEST_TAG_PREFIX = "cloudinary_npm_test"; // identifies resources created by this SDK's tests diff --git a/test/structured_metadata_spec.js b/test/structured_metadata_spec.js index e1c6e901..a5f9cfa1 100644 --- a/test/structured_metadata_spec.js +++ b/test/structured_metadata_spec.js @@ -3,7 +3,7 @@ const Q = require('q'); const cloudinary = require("../cloudinary"); const helper = require("./spechelper"); -const TEST_ID = helper.TEST_ID; +const TEST_ID = Date.now(); const TEST_TAG = helper.TEST_TAG; const UPLOAD_TAGS = helper.UPLOAD_TAGS; const uploadImage = helper.uploadImage; @@ -35,7 +35,7 @@ const LABEL_DATE = 'metadata_date_' + TEST_ID; const api = cloudinary.v2.api; describe("structured metadata api", function () { - this.timeout(helper.TIMEOUT_MEDIUM); + this.timeout(helper.TIMEOUT_LARGE); before(function () { return Q.allSettled( diff --git a/types/index.d.ts b/types/index.d.ts index 98ab3f0c..a920c762 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -225,7 +225,6 @@ declare module 'cloudinary' { | "webp" | "zip" | "svg" - | "mp4" | "webm" | "wdp" | "hpx" @@ -839,7 +838,7 @@ declare module 'cloudinary' { function upload_large(path: string, callback?: ErrorCallBack): Promise; function upload_stream(options?: UploadApiOptions, callback?: ErrorCallBack): Promise; - + function upload_stream(callback?: ErrorCallBack): Promise; function upload_tag_params(options?: UploadApiOptions, callback?: ErrorCallBack): Promise;