Skip to content

Commit 571e4aa

Browse files
committed
Test return value of assertUnit/assertNoUnits
1 parent 4320b5b commit 571e4aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js-api-spec/value/number.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Sass number', () => {
3232
expect(number.denominatorUnits.isEmpty()).toBe(true);
3333
expect(number.hasUnits).toBe(false);
3434
expect(number.hasUnit('px')).toBe(false);
35-
expect(() => number.assertNoUnits()).not.toThrow();
35+
expect(() => number.assertNoUnits()).toEqual(number);
3636
expect(() => number.assertUnit('px')).toThrow();
3737
});
3838

@@ -271,7 +271,7 @@ describe('Sass number', () => {
271271
expect(number.numeratorUnits).toEqualWithHash(List(['px']));
272272
expect(number.hasUnits).toBe(true);
273273
expect(number.hasUnit('px')).toBe(true);
274-
expect(() => number.assertUnit('px')).not.toThrow();
274+
expect(() => number.assertUnit('px')).toEqual(number);
275275
expect(() => number.assertNoUnits()).toThrow();
276276
});
277277

0 commit comments

Comments
 (0)