Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit bdae1f4

Browse files
fix: typescript 3.7.2, fix tests too (#68)
* fix: typescript 3.7.2, fix tests too * fix(deps-dev): [email protected]
1 parent b941862 commit bdae1f4

File tree

3 files changed

+883
-786
lines changed

3 files changed

+883
-786
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@
122122
"chai": "^4.2.0",
123123
"chokidar-cli": "^2.0.0",
124124
"codecov": "^3.4.0",
125-
"concurrently": "^4.1.1",
125+
"concurrently": "^5.0.0",
126126
"gts": "^1.0.0",
127127
"husky": "^3.0.3",
128-
"io-ts-fuzzer": "^4.1.1",
128+
"io-ts-fuzzer": "^4.3.2",
129129
"mocha": "^6.1.4",
130130
"nyc": "^14.1.1",
131131
"source-map-support": "^0.5.12",
132132
"ts-mocha": "^6.0.0",
133-
"typescript": "~3.5.0"
133+
"typescript": "~3.7.2"
134134
}
135135
}

test/test-wkt.ts

+5-26
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ describe('wkt', () => {
3939
];
4040
for (const x of wkts) {
4141
const d = lib.DirectGeometryFromWKTString.decode(x);
42-
if (isRight(d)) {
43-
assert.deepStrictEqual(d.right, {}, x);
44-
}
42+
assert.ok(isLeft(d));
4543
}
4644
});
4745
describe('fuzzing', async () => {
@@ -77,11 +75,6 @@ describe('wkt', () => {
7775

7876
const d = lib.DirectGeometryFromWKTString.decode(x);
7977
if (!isRight(d)) {
80-
assert.deepStrictEqual(
81-
{},
82-
gjd.right,
83-
'could not decode the WKT: ' + x
84-
);
8578
throw new Error();
8679
}
8780
assert.deepStrictEqual(d.right, expected);
@@ -112,9 +105,7 @@ describe('wkt', () => {
112105
];
113106
for (const x of wkts) {
114107
const d = lib.GeometryFromWKTString.decode(x);
115-
if (isRight(d)) {
116-
assert.deepStrictEqual(d.right, {}, x);
117-
}
108+
assert.ok(isLeft(d));
118109
}
119110
});
120111
describe('fuzzing', async () => {
@@ -157,11 +148,6 @@ describe('wkt', () => {
157148

158149
const d = lib.GeometryFromWKTString.decode(x);
159150
if (!isRight(d)) {
160-
assert.deepStrictEqual(
161-
{},
162-
gjd.right,
163-
'could not decode the WKT: ' + x
164-
);
165151
throw new Error();
166152
}
167153
assert.deepStrictEqual(d.right, expected);
@@ -183,9 +169,7 @@ describe('wkt', () => {
183169
];
184170
for (const x of wkts) {
185171
const d = lib.WKTStringFromGeometry.decode(x);
186-
if (isRight(d)) {
187-
assert.deepStrictEqual(d.right, {}, x);
188-
}
172+
assert.ok(isLeft(d));
189173
}
190174
});
191175
describe('fuzzing', async () => {
@@ -198,10 +182,7 @@ describe('wkt', () => {
198182
for (const i of new Array(fuzzCount).keys()) {
199183
const gju = gen.encode([i, fuzzCtx]);
200184
const d = lib.WKTStringFromGeometry.decode(gju);
201-
if (!isRight(d)) {
202-
assert.deepStrictEqual({}, gju, 'could not decode the WKT');
203-
throw new Error();
204-
}
185+
assert.ok(isRight(d));
205186
}
206187
});
207188

@@ -254,9 +235,7 @@ describe('wkt', () => {
254235
];
255236
for (const x of wkts) {
256237
const d = lib.WKT.decode(x);
257-
if (isRight(d)) {
258-
assert.deepStrictEqual(d.right, {}, x);
259-
}
238+
assert.ok(isLeft(d));
260239
}
261240
});
262241
});

0 commit comments

Comments
 (0)