mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore: use specific assert methods in project euler problems (#60598)
This commit is contained in:
committed by
GitHub
parent
25cff1ecd8
commit
8114156602
+1
-1
@@ -28,7 +28,7 @@ Using the `triangles` array containing coordinates of triangles, find the number
|
||||
`triangleContainment(exampleTriangles)` should return a number.
|
||||
|
||||
```js
|
||||
assert(typeof triangleContainment(_exampleTriangles) === 'number');
|
||||
assert.isNumber(triangleContainment(_exampleTriangles));
|
||||
```
|
||||
|
||||
`triangleContainment(exampleTriangles)` should return `1`.
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ Give your answer with hexadecimal number as a string.
|
||||
`hexadecimalNumbers()` should return a string.
|
||||
|
||||
```js
|
||||
assert(typeof hexadecimalNumbers() === 'string');
|
||||
assert.isString(hexadecimalNumbers());
|
||||
```
|
||||
|
||||
`hexadecimalNumbers()` should return the string `3D58725572C62302`.
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ Give your answer as a string with comma separated integers, without any whitespa
|
||||
`shortenedBinaryExpansionOfNumber()` should return a string.
|
||||
|
||||
```js
|
||||
assert(typeof shortenedBinaryExpansionOfNumber() === 'string');
|
||||
assert.isString(shortenedBinaryExpansionOfNumber());
|
||||
```
|
||||
|
||||
`shortenedBinaryExpansionOfNumber()` should return the string `1,13717420,8`.
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ For any given `p` and `q`, find the sum of all values of `e`, `1 < e < φ(p,q)`
|
||||
`RSAEncryption` should be a function.
|
||||
|
||||
```js
|
||||
assert(typeof RSAEncryption === 'function')
|
||||
assert.isFunction(RSAEncryption);
|
||||
```
|
||||
|
||||
`RSAEncryption` should return a number.
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ What fraction of the area is not covered by circles after `n` iterations? Give y
|
||||
`iterativeCirclePacking(10)` should return a number.
|
||||
|
||||
```js
|
||||
assert(typeof iterativeCirclePacking(10) === 'number');
|
||||
assert.isNumber(iterativeCirclePacking(10));
|
||||
```
|
||||
|
||||
`iterativeCirclePacking(10)` should return `0.00396087`.
|
||||
|
||||
Reference in New Issue
Block a user