Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Increased ava unit test timeout #209

Merged
merged 4 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/backend-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"fix": "eslint . --ext .ts --fix"
},
"ava": {
"timeout": "1m",
"timeout": "2m",
"files": [
"!build/**/*"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/backend-federation-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"fix": "eslint . --ext .ts --fix"
},
"ava": {
"timeout": "1m",
"timeout": "2m",
"files": [
"!build/**/*"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/backend-federation-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"fix": "eslint . --ext .ts --fix"
},
"ava": {
"timeout": "1m",
"timeout": "2m",
"files": [
"!build/**/*"
],
Expand Down
1 change: 1 addition & 0 deletions packages/backend-federation-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"include": ["src"],
"exclude" : ["src/**/*.test.ts"],
"references": [
{ "path": "../backend-testing" },
{ "path": "../backend-core" }
]
}
2 changes: 1 addition & 1 deletion packages/backend-internal-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"fix": "eslint . --ext .ts --fix"
},
"ava": {
"timeout": "1m",
"timeout": "2m",
"files": [
"!build/**/*"
],
Expand Down
1 change: 1 addition & 0 deletions packages/backend-internal-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"exclude" : ["src/**/*.test.ts"],
"references": [
{ "path": "../shared" },
{ "path": "../backend-testing" },
{ "path": "../backend-core" },
{ "path": "../backend-federation-client" }
]
Expand Down
2 changes: 1 addition & 1 deletion packages/backend-ml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"fix": "eslint . --ext .ts --fix"
},
"ava": {
"timeout": "1m",
"timeout": "2m",
"files": [
"!build/**/*"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { InvalidFileError } from "../parser";
import { EnronParser } from "../enron-parser";

test("Parse valid", async (t) => {
const parser = new EnronParser(`${__dirname}/data/enron-valid.zip`);
const parser = new EnronParser(`${__dirname}/../../../test-data/enron-valid.zip`);
const messages = await parser.getMessages();

t.deepEqual(messages, [
Expand All @@ -17,7 +17,7 @@ test("Parse valid", async (t) => {
});

test("Parse invalid", async (t) => {
const parser = new EnronParser(`${__dirname}/data/enron-invalid.zip`);
const parser = new EnronParser(`${__dirname}/../../../test-data/enron-invalid.zip`);

await t.throwsAsync(async () => await parser.getMessages(), {
instanceOf: InvalidFileError,
Expand Down
6 changes: 3 additions & 3 deletions packages/backend-ml/src/parsers/__tests__/sms-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { InvalidFileError } from "../parser";
import { SmsParser } from "../sms-parser";

test("Parse valid", async (t) => {
const parser = new SmsParser(`${__dirname}/data/sms-valid.zip`);
const parser = new SmsParser(`${__dirname}/../../../test-data/sms-valid.zip`);
const messages = await parser.getMessages();

t.deepEqual(messages, [
Expand All @@ -17,15 +17,15 @@ test("Parse valid", async (t) => {
});

test("Parse invalid file", async (t) => {
const parser = new SmsParser(`${__dirname}/data/sms-invalid-file.zip`);
const parser = new SmsParser(`${__dirname}/../../../test-data/sms-invalid-file.zip`);

await t.throwsAsync(async () => await parser.getMessages(), {
instanceOf: InvalidFileError,
});
});

test("Parse invalid type", async (t) => {
const parser = new SmsParser(`${__dirname}/data/sms-invalid-type.zip`);
const parser = new SmsParser(`${__dirname}/../../../test-data/sms-invalid-type.zip`);

await t.throwsAsync(async () => await parser.getMessages(), {
instanceOf: InvalidFileError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import test from "ava";
import { SpamAssasinParser } from "../spam-assasin-parser";

test("Parse valid", async (t) => {
const parser = new SpamAssasinParser(`${__dirname}/data/spam-assasin-valid.zip`);
const parser = new SpamAssasinParser(`${__dirname}/../../../test-data/spam-assasin-valid.zip`);
const messages = await parser.getMessages();

t.deepEqual(messages, [
Expand Down
1 change: 1 addition & 0 deletions packages/backend-testing/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"composite": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"target": "es2018",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"fix": "eslint . --ext .ts --fix"
},
"ava": {
"timeout": "1m",
"timeout": "2m",
"files": [
"!build/**/*"
],
Expand Down