Skip to content

Commit

Permalink
Refactor location of test files (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-tolosa committed May 4, 2020
1 parent f98fe07 commit a83d7d1
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ require('dotenv').load({
});

const expect = require("expect.js");
const cloudinary = require("../../cloudinary");
const helper = require("../spechelper");
const cloudinary = require("../../../../cloudinary");
const helper = require("../../../spechelper");

describe('account API - Provisioning', function () {
let CLOUD_SECRET;
Expand Down
12 changes: 6 additions & 6 deletions test/spechelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ exports.TEST_TAG_PREFIX = "cloudinary_npm_test"; // identifies resources created
exports.TEST_TAG = exports.TEST_TAG_PREFIX + "_" + exports.SUFFIX; // identifies resources created in the current test run with a unique tag
exports.TEST_ID = exports.TEST_TAG; // identifies resources created in the current test run with a unique id
exports.UPLOAD_TAGS = [exports.TEST_TAG, exports.TEST_TAG_PREFIX, exports.SDK_TAG];
exports.IMAGE_FILE = "test/resources/logo.png";
exports.LARGE_RAW_FILE = "test/resources/TheCompleteWorksOfShakespeare.mobi";
exports.LARGE_VIDEO = "test/resources/CloudBookStudy-HD.mp4";
exports.EMPTY_IMAGE = "test/resources/empty.gif";
exports.RAW_FILE = "test/resources/docx.docx";
exports.ICON_FILE = "test/resources/favicon.ico";
exports.IMAGE_FILE = "test/.resources/logo.png";
exports.LARGE_RAW_FILE = "test/.resources/TheCompleteWorksOfShakespeare.mobi";
exports.LARGE_VIDEO = "test/.resources/CloudBookStudy-HD.mp4";
exports.EMPTY_IMAGE = "test/.resources/empty.gif";
exports.RAW_FILE = "test/.resources/docx.docx";
exports.ICON_FILE = "test/.resources/favicon.ico";
exports.VIDEO_URL = "http://res.cloudinary.com/demo/video/upload/dog.mp4";
exports.IMAGE_URL = "http://res.cloudinary.com/demo/image/upload/sample";

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const expect = require("expect.js");
const fs = require('fs');
const path = require('path');
const helper = require("../spechelper");
const helper = require("../../spechelper");

const FileKeyValueStorage = require("../../" + helper.libPath + "/cache/FileKeyValueStorage");
const FileKeyValueStorage = require("../../../" + helper.libPath + "/cache/FileKeyValueStorage");

const KEY = "test_key";
const VALUE = "test_value";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const expect = require("expect.js");
const helper = require("../spechelper");
const helper = require("../../spechelper");

const DummyCacheStorage = require('./DummyCacheStorage');

const KeyValueCacheAdapter = require(`../../${helper.libPath}/cache/KeyValueCacheAdapter`);
const KeyValueCacheAdapter = require(`../../../${helper.libPath}/cache/KeyValueCacheAdapter`);

var cache;
var parameters = ["public_id", "upload", "image", "w_100", "jpg"];
Expand Down
4 changes: 2 additions & 2 deletions test/image_spec.js → test/unit/tags/image_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const expect = require('expect.js');
const cloudinary = require('../cloudinary');
const { setupCache, sharedExamples, includeContext } = require("./spechelper");
const cloudinary = require('../../../cloudinary');
const { setupCache, sharedExamples, includeContext } = require("../../spechelper");

const { extend, isEmpty } = cloudinary.utils;
const BREAKPOINTS = [5, 3, 7, 5];
Expand Down
4 changes: 2 additions & 2 deletions test/video_spec.js → test/unit/tags/video_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var cloudinary, expect, helper;

expect = require('expect.js');

cloudinary = require('../cloudinary');
cloudinary = require('../../../cloudinary');

helper = require("./spechelper");
helper = require("../../spechelper");

describe("video tag helper", function () {
var DEFAULT_UPLOAD_PATH, VIDEO_UPLOAD_PATH;
Expand Down
2 changes: 1 addition & 1 deletion test/video_url_spec.js → test/unit/url/video_url_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require('dotenv').load({
});

const expect = require("expect.js");
const cloudinary = require("../cloudinary");
const cloudinary = require("../../../cloudinary");

const utils = cloudinary.utils;

Expand Down

0 comments on commit a83d7d1

Please sign in to comment.