Skip to content

Commit 0fe6439

Browse files
committed
Be clear on the intent of filtering out nulls
1 parent 4bbc98b commit 0fe6439

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

playgrounds/jasmine/test/specs/basic-matchers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('Basic Expect Matchers', () => {
5353
const hrefs: string[] = []
5454
for (const link of navLinks) {
5555
const href = await link.getAttribute('href')
56-
if(href) hrefs.push(href)
56+
if(href !== null) hrefs.push(href)
5757
}
5858

5959
await expect(hrefs).toBeInstanceOf(Array)

playgrounds/jasmine/test/specs/jasmine-specific.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Jasmine-Specific Features', () => {
3939
const hrefs: string[] = []
4040
for (const link of navLinks) {
4141
const href = await link.getAttribute('href')
42-
if(href) hrefs.push(href)
42+
if(href !== null) hrefs.push(href)
4343
}
4444
await expect(hrefs).toEqual(jasmine.arrayContaining(['/docs/gettingstarted']))
4545
})

playgrounds/jest/test/specs/basic-matchers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('Basic Expect Matchers', () => {
5151
const hrefs: string[] = []
5252
for (const link of navLinks) {
5353
const href = await link.getAttribute('href')
54-
if(href) hrefs.push(href)
54+
if(href !== null) hrefs.push(href)
5555
}
5656

5757
expect(hrefs).toBeInstanceOf(Array)

playgrounds/mocha/test/specs/basic-matchers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('Basic Expect Matchers', () => {
5151
const hrefs: string[] = []
5252
for (const link of navLinks) {
5353
const href = await link.getAttribute('href')
54-
if(href) hrefs.push(href)
54+
if(href !== null) hrefs.push(href)
5555
}
5656

5757
expect(hrefs).toBeInstanceOf(Array)

0 commit comments

Comments
 (0)