mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 15:39:42 +08:00
12 lines
373 B
JavaScript
12 lines
373 B
JavaScript
import Cone from '../Cone'
|
|
|
|
const cone = new Cone(3, 5)
|
|
|
|
test('The Volume of a cone with base radius equal to 3 and height equal to 5', () => {
|
|
expect(parseFloat(cone.volume().toFixed(2))).toEqual(47.12)
|
|
})
|
|
|
|
test('The Surface Area of a cone with base radius equal to 3 and height equal to 5', () => {
|
|
expect(parseFloat(cone.surfaceArea().toFixed(2))).toEqual(83.23)
|
|
})
|