Skip to content

Commit

Permalink
Use assert over expect
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Sep 8, 2020
1 parent 3e0f033 commit 4975f38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/services/OptionsService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4975f38

Please sign in to comment.