[PathKit] Make pathops assertion a little more forgiving
Bug: skia:
Change-Id: I5135b8e38e955fe5dbbad8a16bf3f26c98e4e996
Reviewed-on: https://skia-review.googlesource.com/150124
Reviewed-by: Cary Clark <caryclark@google.com>
diff --git a/experimental/pathkit/tests/pathops.spec.js b/experimental/pathkit/tests/pathops.spec.js
index 38320e7..5917b15 100644
--- a/experimental/pathkit/tests/pathops.spec.js
+++ b/experimental/pathkit/tests/pathops.spec.js
@@ -125,7 +125,8 @@
r.json().then((json)=>{
expect(json).toBeTruthy();
let testNames = Object.keys(json);
- expect(testNames.length).toBe(363); // Remove if test data changes a lot.
+ // Assert we loaded a non-zero amount of tests, i.e. the JSON is valid.
+ expect(testNames.length > 0).toBeTruthy();
testNames.sort();
for (testName of testNames) {
let test = json[testName];
@@ -182,7 +183,8 @@
r.json().then((json)=>{
expect(json).toBeTruthy();
let testNames = Object.keys(json);
- expect(testNames.length).toBe(461); // Remove if test data changes a lot.
+ // Assert we loaded a non-zero amount of tests, i.e. the JSON is valid.
+ expect(testNames.length > 0).toBeTruthy();
testNames.sort();
for (testName of testNames) {
let test = json[testName];