Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test(`should return 200 for ${numTestUsers} test users`, done => {
- const a = [];
- for (let i = 0; i < numTestUsers; ++i) {
- const password = `password${i}`;
- a.push(() => api.post("/user/register")
- .send({
- username: `test${i}`,
- password: password,
- confirmPassword: password
- })
- .expect(200)
- .then(res => {
- credentials.push({ user: res.body.id, password: password });
- }));
- }
- Promise.all(a).then(done);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement