Skip to content

Commit 4bc61b8

Browse files
mock github link
1 parent ca173d0 commit 4bc61b8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

redisinsight/api/test/api/custom-tutorials/POST-custom-tutorials.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ describe('POST /custom-tutorials', () => {
115115
before(async () => {
116116
await fsExtra.remove(customTutorialsFolder);
117117
await (await localDb.getRepository(localDb.repositories.CUSTOM_TUTORIAL)).clear();
118-
119-
const zip = await fsExtra.readFile(path.join(staticsFolder, 'test.zip'))
120-
nockScope.get('/test.zip').reply(200, zip);
121118
});
122119

123120
describe('Common', () => {
@@ -202,6 +199,8 @@ describe('POST /custom-tutorials', () => {
202199

203200
it('should import tutorial from the external link with manifest', async () => {
204201
const zip = new AdmZip(path.join(staticsFolder, 'test.zip'));
202+
const file = await fsExtra.readFile(path.join(staticsFolder, 'test.zip'))
203+
nockScope.get('/test.zip').reply(200, file);
205204
const link = `https://github.com/somerepo/test.zip`;
206205

207206
await validateApiCall({

0 commit comments

Comments
 (0)