type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
nextAuth0UserId = 'userid';
nextAuth0UserTenant = 'classid';
nextAuth0UserRole = 'student';
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
async () => {
authStub.restore();
studentsByUserIdStub.restore();
await store.deleteProjectsByClassId(TESTCLASS);
await store.deleteAllPendingJobs();
return store.disconnect();
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
it('should handle requests for non-existent projects', () => {
const classid = uuid();
const studentid = uuid();
const projectid = uuid();
nextAuth0UserId = studentid;
nextAuth0UserTenant = classid;
return request(testServer)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const classid = uuid();
const studentid = uuid();
const projectid = uuid();
nextAuth0UserId = studentid;
nextAuth0UserTenant = classid;
return request(testServer)
.get('/api/classes/' + classid + '/students/' + studentid + ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.error, 'Not found');
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
const INCORRECT_CLASS = uuid();
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
const projectId = body.id;
nextAuth0UserTenant = INCORRECT_CLASS;
return request(testServer)
.get('/api/classes/' + INCORRECT_CLASS + '/studen... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.error, 'Invalid access');
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const teacherId = uuid();
nextAuth0UserTenant = TESTCLASS;
nextAuth0UserId = teacherId;
nextAuth0UserRole = 'supervisor';
let projectInfo: any;
return request(testServer)
.post('/ap... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
const projectId = body.id;
projectInfo = body;
nextAuth0UserId = studentId;
nextAuth0UserRole = 'student';
return request(test... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body, projectInfo);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const teacherId = uuid();
nextAuth0UserTenant = TESTCLASS;
nextAuth0UserId = teacherId;
nextAuth0UserRole = 'supervisor';
let projectInfo: any;
return request(testServer)
.post('/api/classes/' + TESTCLASS + '/students/'... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
const projectId = body.id;
projectInfo = body;
return request(testServer)
.get('/api/classes/' + TESTCLASS + '/students/' + teacherId + '/proje... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const teacherId = uuid();
nextAuth0UserTenant = TESTCLASS;
nextAuth0UserId = teacherId;
nextAuth0UserRole = 'supervisor';
return request(testServer)
.post('/api/classes/' + TESTCLASS + '/student... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
const projectId = body.id;
nextAuth0UserId = studentId;
nextAuth0UserRole = 'student';
return request(testServer)
.get('/a... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body, {
error : 'Invalid access',
});
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
it('should handle requests for non-existent projects', () => {
const classid = uuid();
const studentid = uuid();
const projectid = uuid();
nextAuth0UserId = studentid;
nextAuth0UserTenant = classid;
return request(testServer)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const classid = uuid();
const studentid = uuid();
const projectid = uuid();
nextAuth0UserId = studentid;
nextAuth0UserTenant = classid;
return request(testServer)
.del('/api/classes/' + classid + '/students/' + studentid + ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
let projectId: string;
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
projectId = body.id;
return request(testServer)
.get(url + '/' + projectId)
.expect('Content-Type', /json/)
.expect... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.del(url + '/' + projectId)
.expect(httpstatus.NO_CONTENT);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.get(url + '/' + projectId)
.expect('Content-Type', /json/)
.expect(httpstatus.NOT_FOUND);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
async () => {
let projectid: string = '';
const classid = 'TESTTENANT';
const userid = uuid();
const url = '/api/classes/' + classid + '/students/' + userid + '/projects';
await store.deleteAllPendingJobs();
const jobBefore = await store.getNex... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
projectid = body.id;
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
const INCORRECT_CLASS = uuid();
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(body.id);
const projectId = body.id;
return request(testServer)
.del('/api/classes/' + INCORRECT_CLASS + '/students/' + studentId + '/projects/' + projectId)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.post(url)
.send({ ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(err) => {
assert.deepStrictEqual(err.body, {
error : 'Sorry, some of those letters can\'t be used in project names',
});
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.post(url)
.send({ ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(err) => {
assert.strictEqual(err.body.error, 'Invalid project name');
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.post(url)
.send({ ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(err) => {
assert.strictEqual(err.body.error, 'Support for images projects is not enabled for your class');
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.post(url)
.send({ ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.post(url)
.send({ name : uuid(), type : 'text', language : 'en' })
.expect('Content-Type', /json/)
.expect(httpstatus.CREATED);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.post(url)
.send({ name : uuid(), type : 'text', language : 'en' })
.expect('Content-Type', /json/)
.expect(httpstatus.CONFLICT);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(err) => {
assert.strictEqual(err.body.error, 'User already has maximum number of projects');
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = { name : uuid() };
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServe... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.error, 'Missing required field');
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'numbers',
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAut... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
assert.deepStrictEqual(res.body, { error : 'Fields required for numbers projects' });
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'numbers',
fields : [],
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = s... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'numbers',
fields : [ '' ],
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
assert.deepStrictEqual(res.body, { error : 'Missing required attributes' });
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'numbers',
fields : [ { type : 'number', name : 'abcdefghijklmnopqrstuv' } ],
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + stu... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
assert.deepStrictEqual(res.body, { error : 'Invalid field name' });
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'numbers',
fields : [ { type : 'something', name : 'failing' } ],
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/p... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
assert.deepStrictEqual(res.body, { error : 'Invalid field type something' });
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'text',
language : 'it',
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.userid, studentId);
assert.strictEqual(body.classid, TESTCLASS);
assert.strictEqual(body.type, projectDetails.type);
assert.strictEqual(body.name, projectDetails... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.userid, studentId);
assert.strictEqual(body.classid, TESTCLASS);
assert.strictEqual(body.type, projectDetails.type);
assert.strictEqual(body.name, projectDetails... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'sounds',
};
const studentId = uuid();
const classid = 'TESTTENANT';
const url = '/api/classes/' + classid + '/students/' + studentId + '/projects';
nextAuth0... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.userid, studentId);
assert.strictEqual(body.classid, classid);
assert.strictEqual(body.type, projectDetails.type);
assert.strictEqual(body.name, projectDetails.n... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.userid, studentId);
assert.strictEqual(body.classid, classid);
assert.strictEqual(body.type, projectDetails.type);
assert.strictEqual(body.name, projectDetails.n... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'text',
language : 'it',
isCrowdSourced : true,
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/pro... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body, {
error : 'Only teachers or group leaders can create crowd-sourced projects',
});
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = {
name : uuid(),
type : 'text',
language : 'it',
isCrowdSourced : true,
};
const studentId = uuid();
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/pro... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.userid, studentId);
assert.strictEqual(body.classid, TESTCLASS);
assert.strictEqual(body.type, projectDetails.type);
assert.strictEqual(body.name, projectDetails... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.strictEqual(body.userid, studentId);
assert.strictEqual(body.classid, TESTCLASS);
assert.strictEqual(body.type, projectDetails.type);
assert.strictEqual(body.name, projectDetails... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
it('should cope with an empty list', () => {
const classid = uuid();
const studentid = uuid();
nextAuth0UserId = studentid;
nextAuth0UserTenant = classid;
return request(testServer)
.get('/api/classes/' + classid + '/students/... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const classid = uuid();
const studentid = uuid();
nextAuth0UserId = studentid;
nextAuth0UserTenant = classid;
return request(testServer)
.get('/api/classes/' + classid + '/students/' + studentid + '/projects')
.expect('... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(Array.isArray(body));
assert.strictEqual(body.length, 0);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentId = uuid();
let count = 0;
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.post(u... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.get(url)
.expect('Content-Type', /json/)
.expect(httpstatus.OK);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(Array.isArray(body));
assert(body.length > 0);
count = body.length;
return request(testServer)
.post(url)
.send({ name : uuid(), ... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(Array.isArray(body));
assert.strictEqual(body.length, count + 1);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
return res.body;
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const classId = uuid();
const studentA = uuid();
const studentB = uuid();
const teacherId = uuid();
const expectedStudentA: any[] = [];
const expectedStudentB: any[] = [];
const expectedTeacher: any[] = [];
const... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return testCreateProject(classId, studentA, false);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(newproj) => {
expected.studentA.push(newproj);
return testVerifyAll(classId, studentA, studentB, teacherId, expected);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return testCreateProject(classId, teacherId, true);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(newproj) => {
expected.studentA.push(newproj);
expected.studentB.push(newproj);
expected.teacher.push(newproj);
return testVerifyAll(classId, studentA, studentB, teacherId, expected);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return testCreateProject(classId, studentB, false);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(newproj) => {
expected.studentB.push(newproj);
return testVerifyAll(classId, studentA, studentB, teacherId, expected);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return testCreateProject(classId, teacherId, false);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(newproj) => {
expected.teacher.push(newproj);
return testVerifyAll(classId, studentA, studentB, teacherId, expected);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return store.deleteProjectsByClassId(classId);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
it('should cope with an empty list', () => {
const classid = uuid();
nextAuth0UserRole = 'supervisor';
nextAuth0UserTenant = classid;
return request(testServer)
.get('/api/classes/' + classid + '/projects')
.expect('Conten... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const classid = uuid();
nextAuth0UserRole = 'supervisor';
nextAuth0UserTenant = classid;
return request(testServer)
.get('/api/classes/' + classid + '/projects')
.expect('Content-Type', /json/)
.expect(httpstatus.OK... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const studentA = uuid();
const studentB = uuid();
let count: number;
nextAuth0UserId = 'teacher';
nextAuth0UserRole = 'supervisor';
nextAuth0UserTenant = TESTCLASS;
return request(testServer)
.get('/api/classe... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(Array.isArray(body));
count = body.length;
return request(testServer)
.post('/api/classes/' + TESTCLASS + '/students/' + studentA + '/projects')
.sen... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.get('/api/classes/' + TESTCLASS + '/projects')
.expect('Content-Type', /json/)
.expect(httpstatus.OK);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert(Array.isArray(body));
assert.strictEqual(body.length, count + 1);
count = body.length;
return request(testServer)
.post('/api/classes/' + TESTCLASS + '/... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = { type : 'text', name : uuid(), language : 'en' };
const studentId = uuid();
let projectId: string;
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nex... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
projectId = body.id;
return request(testServer)
.get(url + '/' + projectId)
.expect('Content-Type', /json/)
.expect(httpstatus.OK);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, []);
return request(testServer)
.patch(url + '/' + projectId)
.send([{
path : '/labels', op : 'add',
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
return request(testServer)
.get(url + '/' + projectId)
.expect('Content-Type', /json/)
.expect(httpstatus.OK);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, [ 'newlabel' ]);
return request(testServer)
.patch(url + '/' + projectId)
.send([{
path : '/labels', op : 'add',... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, [ 'newlabel', 'different' ]);
return request(testServer)
.patch(url + '/' + projectId)
.send([{
path : '/labels'... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, [ 'newlabel', 'different' ]);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = { type : 'text', name : uuid(), language : 'en' };
const studentId = uuid();
let projectId: string;
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
nex... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, [ 'newlabel' ]);
return request(testServer)
.patch(url + '/' + projectId)
.send([{
path : '/labels', op : 'remov... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, []);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
async () => {
const studentId = uuid();
let projectId: string = '';
const label = 'newlabel';
const imageIds = [ uuid(), uuid(), uuid() ];
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
await store.deleteAllPen... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = { type : 'text', name : uuid(), language : 'en' };
const studentId = uuid();
let projectId: string;
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
ne... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, [ 'newlabel' ]);
return request(testServer)
.patch(url + '/' + projectId)
.send([{
path : '/labels', op : 'repla... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body.labels, [ 'apple', 'banana', 'tomato' ]);
} | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
() => {
const projectDetails = { type : 'text', name : uuid(), language : 'en' };
const studentId = uuid();
let projectId: string;
const url = '/api/classes/' + TESTCLASS + '/students/' + studentId + '/projects';
nextAuth0UserId = studentId;
ne... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
projectId = body.id;
return request(testServer)
.patch(url + '/' + projectId)
.expect('Content-Type', /json/)
.expect(httpstatus.BAD_REQUEST);
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body, {
error: 'PATCH body should be an array',
});
return request(testServer)
.patch(url + '/' + projectId)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
ArrowFunction |
(res) => {
const body = res.body;
assert.deepStrictEqual(body, {
error: 'PATCH body should be an array',
});
return request(testServer)
.patch(url + '/' + projectId)
... | OwenG88/taxinomitis | src/tests/restapi/projects.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.