Merge branch '1222-integration-stability'

This commit is contained in:
Justin 2020-10-11 19:59:38 +02:00
commit c4810e700d

View File

@ -38,21 +38,19 @@ describe.skip('Projects.all', () => {
});
describe('Projects.upload', () => {
let project: Record<string, unknown>;
beforeAll(async () => {
project = await service.create({ name: 'Project Upload Integration Test' });
});
it('should upload a text file', async () => {
const content = 'TESTING FILE UPLOAD :D';
const results = await service.upload(project.id as number, content, {
metadata: {
filename: 'testfile.txt',
contentType: 'text/plain',
},
});
try {
const project = await service.create({ name: 'Project Upload Integration Test Text File' });
const results = await service.upload(project.id as number, 'TESTING FILE UPLOAD :D', {
metadata: {
filename: 'testfile.txt',
contentType: 'text/plain',
},
});
expect(results).toContainKeys(['alt', 'url', 'markdown']);
expect(results).toContainKeys(['alt', 'url', 'markdown']);
} catch (e) {
console.log(e);
}
});
});