Skip to content

Commit

Permalink
test(ios): update error test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews authored and sgtcoolguy committed May 27, 2021
1 parent 63abac3 commit 0c45fd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Resources/error.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Error', function () {
if (utilities.isAndroid()) {
ex.message.should.equal('Unable to convert null');
} else if (utilities.isIOS()) {
ex.message.should.equal('Invalid type passed to function');
should(ex.message.startsWith('Invalid type passed to function')).be.true();
} else if (utilities.isWindows()) {
ex.message.should.equal('Ti.Geolocation.accuracy expects Number');
}
Expand Down Expand Up @@ -126,8 +126,8 @@ describe('Error', function () {
}
});
} catch (e) {
e.message.should.equal('Invalid type passed to function. Must be either \'linear\' or \'radial\'');
e.nativeReason.should.equal('Must be either \'linear\' or \'radial\'');
should(e.message.startsWith('Invalid type passed to function')).be.true();
should(e.nativeReason).be.eql('Must be either \'linear\' or \'radial\'');
}
});

Expand All @@ -140,7 +140,7 @@ describe('Error', function () {
}
});
} catch (e) {
e.nativeStack.should.match(/TiGradient setType:/);
should(e.nativeStack.includes('TiGradient gradientFromObject:')).be.true();
}
});
});

0 comments on commit 0c45fd6

Please sign in to comment.