Skip to content

Commit 29dab32

Browse files
authored
test: refactor serializer tests to improve coverage (#408)
* test: refactor serializer tests to improve coverage * fix: move timeout in serializer tests * test: cover missed lines in serializer tests * fix: use namespaced checks in serializer tests * fix: get serializer tests passing on postgres
1 parent 999f649 commit 29dab32

File tree

4 files changed

+504
-253
lines changed

4 files changed

+504
-253
lines changed

decl/faker.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @flow
2+
declare module 'faker' {
3+
declare interface name {
4+
static firstName(): string;
5+
static lastName(): string;
6+
}
7+
8+
declare interface image {
9+
static imageUrl(): string;
10+
}
11+
12+
declare interface lorem {
13+
static word(): string;
14+
static sentence(): string;
15+
static paragraph(): string;
16+
static paragraphs(): string;
17+
}
18+
19+
declare interface random {
20+
static boolean(): boolean;
21+
}
22+
23+
declare interface helpers {
24+
static randomize<T>(options: Array<T>): T;
25+
}
26+
27+
declare interface internet {
28+
static email(): string;
29+
static password(length?: number): string;
30+
}
31+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"codecov": "1.0.1",
6161
"documentation": "4.0.0-beta9",
6262
"eslint-plugin-flowtype": "2.19.0",
63+
"faker": "3.1.0",
6364
"flow-bin": "0.32.0",
6465
"mocha": "3.0.2",
6566
"node-fetch": "1.6.1",

src/packages/serializer/test/fixtures/data.js

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)