Skip to content

Commit 6c03028

Browse files
committed
removed code comments
1 parent 220236f commit 6c03028

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

spec/Idempotency.spec.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ describe_only_db('mongo')('Idempotency', () => {
5151
});
5252
// Tests
5353
it('should enforce idempotency for cloud code function', async () => {
54-
// Declare function
5554
let counter = 0;
5655
Parse.Cloud.define('myFunction', () => {
5756
counter++;
5857
});
59-
// Run function
6058
const params = {
6159
method: 'POST',
6260
url: 'http://localhost:8378/1/functions/myFunction',
@@ -76,12 +74,10 @@ describe_only_db('mongo')('Idempotency', () => {
7674
});
7775

7876
it('should delete request entry after TTL', async () => {
79-
// Declare function
8077
let counter = 0;
8178
Parse.Cloud.define('myFunction', () => {
8279
counter++;
8380
});
84-
// Run function
8581
const params = {
8682
method: 'POST',
8783
url: 'http://localhost:8378/1/functions/myFunction',
@@ -102,12 +98,10 @@ describe_only_db('mongo')('Idempotency', () => {
10298
});
10399

104100
it('should enforce idempotency for cloud code jobs', async () => {
105-
// Declare job
106101
let counter = 0;
107102
Parse.Cloud.job('myJob', () => {
108103
counter++;
109104
});
110-
// Run job
111105
const params = {
112106
method: 'POST',
113107
url: 'http://localhost:8378/1/jobs/myJob',
@@ -126,12 +120,10 @@ describe_only_db('mongo')('Idempotency', () => {
126120
});
127121

128122
it('should enforce idempotency for class object creation', async () => {
129-
// Declare trigger
130123
let counter = 0;
131124
Parse.Cloud.afterSave('MyClass', () => {
132125
counter++;
133126
});
134-
// Create object
135127
const params = {
136128
method: 'POST',
137129
url: 'http://localhost:8378/1/classes/MyClass',
@@ -150,12 +142,10 @@ describe_only_db('mongo')('Idempotency', () => {
150142
});
151143

152144
it('should enforce idempotency for user object creation', async () => {
153-
// Declare trigger
154145
let counter = 0;
155146
Parse.Cloud.afterSave('_User', () => {
156147
counter++;
157148
});
158-
// Create object
159149
const params = {
160150
method: 'POST',
161151
url: 'http://localhost:8378/1/users',
@@ -178,12 +168,10 @@ describe_only_db('mongo')('Idempotency', () => {
178168
});
179169

180170
it('should enforce idempotency for installation object creation', async () => {
181-
// Declare trigger
182171
let counter = 0;
183172
Parse.Cloud.afterSave('_Installation', () => {
184173
counter++;
185174
});
186-
// Create object
187175
const params = {
188176
method: 'POST',
189177
url: 'http://localhost:8378/1/installations',
@@ -206,12 +194,10 @@ describe_only_db('mongo')('Idempotency', () => {
206194
});
207195

208196
it('should not interfere with calls of different request ID', async () => {
209-
// Declare trigger
210197
let counter = 0;
211198
Parse.Cloud.afterSave('MyClass', () => {
212199
counter++;
213200
});
214-
// Create 100 objects
215201
const promises = [...Array(100).keys()].map(() => {
216202
const params = {
217203
method: 'POST',
@@ -247,14 +233,12 @@ describe_only_db('mongo')('Idempotency', () => {
247233
});
248234

249235
it('should use default configuration when none is set', async () => {
250-
// Configure server with minimal params
251236
await setup({});
252237
expect(Config.get(Parse.applicationId).idempotencyOptions.ttl).toBe(Definitions.IdempotencyOptions.ttl.default);
253238
expect(Config.get(Parse.applicationId).idempotencyOptions.paths).toBe(Definitions.IdempotencyOptions.paths.default);
254239
});
255240

256241
it('should throw on invalid configuration', async () => {
257-
// Configure server with invalid params
258242
await expectAsync(setup({ paths: 1 })).toBeRejected();
259243
await expectAsync(setup({ ttl: 'a' })).toBeRejected();
260244
await expectAsync(setup({ ttl: 0 })).toBeRejected();

0 commit comments

Comments
 (0)