chore: add test for breaching transfer limit (#2620)

This commit is contained in:
Karol Sójko
2023-11-06 16:03:11 +01:00
committed by GitHub
parent 6295f179a1
commit a6be2f0a9a
3 changed files with 40 additions and 7 deletions

View File

@@ -112,7 +112,7 @@ describe('files', function () {
it('should encrypt and upload small file', async function () {
await setup({ fakeCrypto: false, subscription: true })
const response = await fetch('/packages/snjs/mocha/assets/small_file.md')
const response = await fetch('/mocha/assets/small_file.md')
const buffer = new Uint8Array(await response.arrayBuffer())
const file = await Files.uploadFile(fileService, buffer, 'my-file', 'md', 1000)
@@ -125,7 +125,7 @@ describe('files', function () {
it('should encrypt and upload big file', async function () {
await setup({ fakeCrypto: false, subscription: true })
const response = await fetch('/packages/snjs/mocha/assets/two_mb_file.md')
const response = await fetch('/mocha/assets/two_mb_file.md')
const buffer = new Uint8Array(await response.arrayBuffer())
const file = await Files.uploadFile(fileService, buffer, 'my-file', 'md', 100000)
@@ -138,7 +138,7 @@ describe('files', function () {
it('should delete file', async function () {
await setup({ fakeCrypto: false, subscription: true })
const response = await fetch('/packages/snjs/mocha/assets/small_file.md')
const response = await fetch('/mocha/assets/small_file.md')
const buffer = new Uint8Array(await response.arrayBuffer())
const file = await Files.uploadFile(fileService, buffer, 'my-file', 'md', 1000)