Skip to content

Commit 4154175

Browse files
committed
code coverage 100%
1 parent 8038fbd commit 4154175

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

tests/.DS_Store

6 KB
Binary file not shown.

tests/mediaLibrary.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,18 @@ describe("Media library APIs", function () {
130130
});
131131
});
132132

133-
it('Copy folder invalid path', function (done) {
133+
it('Copy folder invalid sourceFolderPath', function (done) {
134+
destinationPath = "/";
135+
imagekit.copyFolder(null, destinationPath, function (err, response) {
136+
expect(err).to.deep.equal({
137+
messages : "Invalid sourceFolderPath value",
138+
help : "It should be a string like '/path/to/folder'"
139+
})
140+
done();
141+
});
142+
});
143+
144+
it('Copy folder invalid destinationPath', function (done) {
134145
sourceFolderPath = "/";
135146
imagekit.copyFolder(sourceFolderPath, null, function (err, response) {
136147
expect(err).to.deep.equal({
@@ -141,7 +152,7 @@ describe("Media library APIs", function () {
141152
});
142153
});
143154

144-
it('Move folder invalid path', function (done) {
155+
it('Move folder invalid destinationPath', function (done) {
145156
sourceFolderPath = "/";
146157
imagekit.moveFolder(sourceFolderPath, null, function (err, response) {
147158
expect(err).to.deep.equal({
@@ -152,6 +163,17 @@ describe("Media library APIs", function () {
152163
});
153164
});
154165

166+
it('Move folder invalid sourceFolderPath', function (done) {
167+
destinationPath = "/";
168+
imagekit.moveFolder(null, destinationPath, function (err, response) {
169+
expect(err).to.deep.equal({
170+
messages : "Invalid sourceFolderPath value",
171+
help : "It should be a string like '/path/to/folder'"
172+
})
173+
done();
174+
});
175+
});
176+
155177
it('Create folder invalid name', function (done) {
156178
folderName = "";
157179
parentFolderPath = "";

0 commit comments

Comments
 (0)