mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
chore: Upgrade nock and delete nock related boilerplate code (no-changelog) (#12869)
This commit is contained in:
committed by
GitHub
parent
0bb65f27ab
commit
f64c6bf9ac
@@ -17,8 +17,6 @@ describe('Test Binary Data Download', () => {
|
||||
beforeAll(async () => {
|
||||
await initBinaryDataService();
|
||||
|
||||
nock.disableNetConnect();
|
||||
|
||||
nock(baseUrl)
|
||||
.persist()
|
||||
.get('/path/to/image.png')
|
||||
@@ -33,11 +31,6 @@ describe('Test Binary Data Download', () => {
|
||||
'content-disposition': 'attachment; filename="testing.jpg"',
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
nock.restore();
|
||||
});
|
||||
|
||||
const nodeTypes = setup(tests);
|
||||
|
||||
for (const testData of tests) {
|
||||
|
||||
@@ -21,18 +21,11 @@ describe('Test Response Encoding', () => {
|
||||
beforeAll(async () => {
|
||||
await initBinaryDataService();
|
||||
|
||||
nock.disableNetConnect();
|
||||
|
||||
nock(baseUrl)
|
||||
.persist()
|
||||
.get('/index.html')
|
||||
.reply(200, payload, { 'content-type': 'text/plain; charset=latin1' });
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
nock.restore();
|
||||
});
|
||||
|
||||
const nodeTypes = setup(tests);
|
||||
|
||||
for (const testData of tests) {
|
||||
|
||||
@@ -21,18 +21,11 @@ describe('Test Quoted Response Encoding', () => {
|
||||
beforeAll(async () => {
|
||||
await initBinaryDataService();
|
||||
|
||||
nock.disableNetConnect();
|
||||
|
||||
nock(baseUrl)
|
||||
.persist()
|
||||
.get('/index.html')
|
||||
.reply(200, payload, { 'content-type': 'text/plain; charset="latin1"' });
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
nock.restore();
|
||||
});
|
||||
|
||||
const nodeTypes = setup(tests);
|
||||
|
||||
for (const testData of tests) {
|
||||
|
||||
@@ -17,7 +17,6 @@ describe('Test HTTP Request Node', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await initBinaryDataService();
|
||||
nock.disableNetConnect();
|
||||
|
||||
function getPaginationReturnData(this: nock.ReplyFnContext, limit = 10, skip = 0) {
|
||||
const nextUrl = `${baseUrl}/users?skip=${skip + limit}&limit=${limit}`;
|
||||
@@ -192,11 +191,6 @@ describe('Test HTTP Request Node', () => {
|
||||
return getPaginationReturnData.call(this, limit, skip);
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
nock.restore();
|
||||
});
|
||||
|
||||
const nodeTypes = setup(tests);
|
||||
|
||||
for (const testData of tests) {
|
||||
|
||||
@@ -1266,7 +1266,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=4&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1277,7 +1277,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=8&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1288,7 +1288,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=12&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1299,7 +1299,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=16&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1310,7 +1310,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=20&limit=4"
|
||||
},
|
||||
"statusCode": 404,
|
||||
"statusMessage": null
|
||||
"statusMessage": "Not Found"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1532,7 +1532,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=4&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1543,7 +1543,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=8&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1554,7 +1554,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=12&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1565,7 +1565,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=16&limit=4"
|
||||
},
|
||||
"statusCode": 200,
|
||||
"statusMessage": null
|
||||
"statusMessage": "OK"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1576,7 +1576,7 @@
|
||||
"next-url": "https://dummyjson.com/users?skip=20&limit=4"
|
||||
},
|
||||
"statusCode": 404,
|
||||
"statusMessage": null
|
||||
"statusMessage": "Not Found"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user