Use assert over expect

This commit is contained in:
Daniel Imms
2020-09-08 06:18:37 -07:00
parent 3e0f0331b3
commit 4975f389ff
+2 -2
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { assert, expect } from 'chai';
import { assert } from 'chai';
import { OptionsService, DEFAULT_OPTIONS } from 'common/services/OptionsService';
describe('OptionsService', () => {
@@ -45,7 +45,7 @@ describe('OptionsService', () => {
});
it('normalizes invalid fontWeight option values', () => {
service.setOption('fontWeight', 350);
expect(() => service.setOption('fontWeight', 10000)).to.not.throw('', 'fontWeight should be normalized instead of throwing');
assert.doesNotThrow(() => service.setOption('fontWeight', 10000), 'fontWeight should be normalized instead of throwing');
assert.equal(service.getOption('fontWeight'), DEFAULT_OPTIONS.fontWeight, 'Values greater than 1000 should be reset to default');
service.setOption('fontWeight', 350);