Skip to content

Commit

Permalink
Test that sassTrue and sassFalse are instances of SassBoolean (#2045)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goodwine authored Jan 30, 2025
1 parent 51f6902 commit 1dafbb0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js-api-spec/value/boolean.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

import {Value, sassTrue, sassFalse} from 'sass';
import {Value, sassTrue, sassFalse, SassBoolean} from 'sass';

describe('Sass boolean', () => {
describe('sassTrue', () => {
Expand All @@ -24,6 +24,10 @@ describe('Sass boolean', () => {
expect(value.assertBoolean()).toBe(sassTrue);
});

it('is a SassBoolean instance', () => {
expect(value).toBeInstanceOf(SassBoolean);
});

it("isn't any other type", () => {
expect(value.assertCalculation).toThrow();
expect(value.assertColor).toThrow();
Expand Down Expand Up @@ -55,6 +59,10 @@ describe('Sass boolean', () => {
expect(value.assertBoolean()).toBe(sassFalse);
});

it('is a SassBoolean instance', () => {
expect(value).toBeInstanceOf(SassBoolean);
});

it("isn't any other type", () => {
expect(value.assertCalculation).toThrow();
expect(value.assertColor).toThrow();
Expand Down

0 comments on commit 1dafbb0

Please sign in to comment.