Skip to content

Commit e108cf0

Browse files
authored
update: fix test with undefined.
1 parent 56abba6 commit e108cf0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/render-util.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('core/render/utils', () => {
3131
);
3232
expect(content).toBe('My Ignore Title');
3333
expect(ignoreSubHeading).toBeTruthy();
34-
expect(!!ignoreAllSubs).toBeFalsy();
34+
expect(ignoreAllSubs === undefined).toBeTruthy();
3535
});
3636

3737
test('getAndRemoveDocisfyIgnorConfig from <!-- {docsify-ignore-all} -->', () => {
@@ -41,15 +41,15 @@ describe('core/render/utils', () => {
4141
);
4242
expect(content).toBe('My Ignore Title');
4343
expect(ignoreAllSubs).toBeTruthy();
44-
expect(!!ignoreSubHeading).toBeFalsy();
44+
expect(ignoreSubHeading === undefined).toBeTruthy();
4545
});
4646

4747
test('getAndRemoveDocisfyIgnorConfig from {docsify-ignore}', () => {
4848
const { content, ignoreAllSubs, ignoreSubHeading } =
4949
getAndRemoveDocisfyIgnorConfig('My Ignore Title{docsify-ignore}');
5050
expect(content).toBe('My Ignore Title');
5151
expect(ignoreSubHeading).toBeTruthy();
52-
expect(!!ignoreAllSubs).toBeFalsy();
52+
expect(ignoreAllSubs === undefined).toBeTruthy();
5353
});
5454

5555
test('getAndRemoveDocisfyIgnorConfig from {docsify-ignore-all}', () => {

0 commit comments

Comments
 (0)