mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-11 04:01:15 -04:00
fix: add more tests for completeness (#59610)
This commit is contained in:
committed by
GitHub
parent
0412ac5d41
commit
f94a944c4e
@@ -19,18 +19,28 @@ Your `getLoanMessage` function should return a string.
|
||||
|
||||
```js
|
||||
assert.isString(getLoanMessage(65000, 750));
|
||||
assert.isString(getLoanMessage(60000, 750));
|
||||
assert.isString(getLoanMessage(65000, 700));
|
||||
assert.isString(getLoanMessage(60000, 700));
|
||||
```
|
||||
|
||||
Your `getLoanMessage` function should return the string `"You qualify for a duplex, condo, and car loan."`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(getLoanMessage(65000, 750), "You qualify for a duplex, condo, and car loan.");
|
||||
assert.strictEqual(getLoanMessage(60000, 750), "You qualify for a duplex, condo, and car loan.");
|
||||
assert.strictEqual(getLoanMessage(65000, 700), "You qualify for a duplex, condo, and car loan.");
|
||||
assert.strictEqual(getLoanMessage(60000, 700), "You qualify for a duplex, condo, and car loan.");
|
||||
```
|
||||
|
||||
Your `getLoanMessage` function should return `undefined` if the applicant's annual income and credit score do not meet the requirements for a duplex loan.
|
||||
|
||||
```js
|
||||
assert.strictEqual(getLoanMessage(59000, 700), undefined);
|
||||
assert.isUndefined(getLoanMessage(59000, 690));
|
||||
assert.isUndefined(getLoanMessage(59000, 700));
|
||||
assert.isUndefined(getLoanMessage(59000, 750));
|
||||
assert.isUndefined(getLoanMessage(60000, 690));
|
||||
assert.isUndefined(getLoanMessage(65000, 690));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user