Skip to content

Commit

Permalink
style change: use jest toBeNull() instead of toBe(null)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Nov 3, 2024
1 parent 000374c commit 4ea4b83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/candles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ test('makeFastStartEnd', () => {
};
const ev2 = makeFastStartEnd(ev, options);
const startEvent = ev2.startEvent as TimedEvent;
expect(startEvent).not.toBe(null);
expect(startEvent).not.toBeNull();
expect(startEvent.eventTime.toISOString()).toBe('2023-07-27T00:10:00.000Z');
expect(startEvent.eventTimeStr).toBe('20:10');
});
Expand Down
2 changes: 1 addition & 1 deletion test/event.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test('renderBrief', () => {
});

test('emoji', () => {
expect(ev.getEmoji()).toBe(null);
expect(ev.getEmoji()).toBeNull();
});

test('basename', () => {
Expand Down
14 changes: 7 additions & 7 deletions test/sedra.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ test('find', () => {
expect(dt(sedra.find('Bo'))).toBe('2021-01-23');
expect(dt(sedra.find(['Tazria', 'Metzora']))).toBe('2021-04-17');
expect(dt(sedra.find('Tazria-Metzora'))).toBe('2021-04-17');
expect(sedra.find('Tazria')).toBe(null);
expect(sedra.find('Metzora')).toBe(null);
expect(sedra.find('Tazria')).toBeNull();
expect(sedra.find('Metzora')).toBeNull();
expect(dt(sedra.find('Chukat'))).toBe('2021-06-19');
expect(sedra.find(['Chukat', 'Balak'])).toBe(null);
expect(sedra.find('Chukat-Balak')).toBe(null);
expect(sedra.find(['Chukat', 'Balak'])).toBeNull();
expect(sedra.find('Chukat-Balak')).toBeNull();
const sedra5785 = new Sedra(5785, false);
expect(dt(sedra5785.find('Sukkot Shabbat Chol ha-Moed'))).toBe('2024-10-19');
expect(sedra.find('Sukkot Shabbat Chol ha-Moed')).toBeNull();
Expand Down Expand Up @@ -158,7 +158,7 @@ test('find-number', () => {

test('find-bad string returns null', () => {
const sedra = new Sedra(5781, false);
expect(sedra.find('Bogus')).toBe(null);
expect(sedra.find('Bogus')).toBeNull();
});

test('find-throws', () => {
Expand Down Expand Up @@ -191,15 +191,15 @@ test('find-throws', () => {

test('find-holiday', () => {
const sedra1 = new Sedra(5781, false);
expect(sedra1.find('Yom Kippur')).toBe(null);
expect(sedra1.find('Yom Kippur')).toBeNull();
expect(dt(sedra1.find('Pesach VII'))).toBe('2021-04-03');

const sedra2 = new Sedra(5754, true);
expect(dt(sedra2.find('Yom Kippur'))).toBe('1993-09-25');
expect(dt(sedra2.find('Pesach VII'))).toBe('1994-04-02');

const sedra3 = new Sedra(5752, false);
expect(sedra3.find('Pesach VII')).toBe(null);
expect(sedra3.find('Pesach VII')).toBeNull();
expect(dt(sedra3.find('Pesach VIII'))).toBe('1992-04-25');
});

Expand Down

0 comments on commit 4ea4b83

Please sign in to comment.