Skip to content

Commit 3b334c1

Browse files
committed
use one @ts-nochek instead of multiple @ts-ignore
1 parent 4bbb62f commit 3b334c1

File tree

1 file changed

+5
-25
lines changed

1 file changed

+5
-25
lines changed

test/unit/validators/RunValidator.spec.ts

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-nocheck
12
import RunValidator from '../../../src/routes/api/run/validators';
23

34
const sinon = require('sinon');
@@ -32,9 +33,7 @@ describe('RunValidator', async () => {
3233
stdin: 'INPUT'
3334
}
3435
};
35-
const nextSpy = sinon.spy();
3636

37-
// @ts-ignore
3837
await runValidator.POST(req, res, nextSpy);
3938

4039
expect(sentStatus).to.equal(400);
@@ -51,9 +50,7 @@ describe('RunValidator', async () => {
5150
stdin: 'INPUT'
5251
}
5352
};
54-
const nextSpy = sinon.spy();
5553

56-
// @ts-ignore
5754
await runValidator.POST(req, res, nextSpy);
5855
// TODO WRONG
5956
// expect(sentStatus).to.equal(400);
@@ -69,9 +66,7 @@ describe('RunValidator', async () => {
6966
stdin: 'INPUT'
7067
}
7168
};
72-
const nextSpy = sinon.spy();
7369

74-
// @ts-ignore
7570
await runValidator.POST(req, res, nextSpy);
7671

7772
expect(sentStatus).to.equal(400);
@@ -88,9 +83,7 @@ describe('RunValidator', async () => {
8883
stdin: 'INPUT'
8984
}
9085
};
91-
const nextSpy = sinon.spy();
9286

93-
// @ts-ignore
9487
await runValidator.POST(req, res, nextSpy);
9588

9689
expect(sentStatus).to.equal(400);
@@ -106,9 +99,7 @@ describe('RunValidator', async () => {
10699
stdin: 'INPUT'
107100
}
108101
};
109-
const nextSpy = sinon.spy();
110102

111-
// @ts-ignore
112103
await runValidator.POST(req, res, nextSpy);
113104
// TODO
114105
// does not throw error for mode missing
@@ -125,9 +116,7 @@ describe('RunValidator', async () => {
125116
stdin: 'INPUT'
126117
}
127118
};
128-
const nextSpy = sinon.spy();
129119

130-
// @ts-ignore
131120
await runValidator.POST(req, res, nextSpy);
132121
// TODO
133122
expect(nextSpy.calledOnce).to.be.false;
@@ -144,9 +133,8 @@ describe('RunValidator', async () => {
144133
stdin: 'INPUT'
145134
}
146135
};
147-
const nextSpy = sinon.spy();
148136

149-
// @ts-ignore
137+
150138
await runValidator.POST(req, res, nextSpy);
151139
// TODO
152140
expect(nextSpy.calledOnce).to.be.false;
@@ -161,9 +149,8 @@ describe('RunValidator', async () => {
161149
mode: 'poll'
162150
}
163151
};
164-
const nextSpy = sinon.spy();
165-
// @ts-ignore
166152
await runValidator.POST(req, res, nextSpy);
153+
167154
expect(nextSpy.calledOnce).to.be.true;
168155
});
169156

@@ -176,8 +163,7 @@ describe('RunValidator', async () => {
176163
stdin: 123
177164
}
178165
};
179-
const nextSpy = sinon.spy();
180-
// @ts-ignore
166+
181167
await runValidator.POST(req, res, nextSpy);
182168

183169
expect(nextSpy.calledOnce).to.be.false;
@@ -195,7 +181,6 @@ describe('RunValidator', async () => {
195181
}
196182
};
197183

198-
// @ts-ignore
199184
await runValidator.POST(req, res, nextSpy);
200185

201186
expect(nextSpy.calledOnce).to.be.true;
@@ -211,8 +196,7 @@ describe('RunValidator', async () => {
211196
timelimit: '123'
212197
}
213198
};
214-
const nextSpy = sinon.spy();
215-
// @ts-ignore
199+
216200
await runValidator.POST(req, res, nextSpy);
217201

218202
// TODO fix this. CODE is wrong
@@ -231,9 +215,7 @@ describe('RunValidator', async () => {
231215
stdin: ''
232216
}
233217
};
234-
const nextSpy = sinon.spy();
235218

236-
// @ts-ignore
237219
await runValidator.POST(req, res, nextSpy);
238220

239221
expect(sentStatus).to.be.equal(400);
@@ -250,9 +232,7 @@ describe('RunValidator', async () => {
250232
stdin: 'something'
251233
}
252234
};
253-
const nextSpy = sinon.spy();
254235

255-
// @ts-ignore
256236
await runValidator.POST(req, res, nextSpy);
257237

258238
expect(nextSpy.calledOnce).to.be.true;

0 commit comments

Comments
 (0)