mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
Added DegreeToRadian.js and DegreeToRadian.test.js in Maths directory
This commit is contained in:
21
Maths/test/DegreeToRadian.test.js
Normal file
21
Maths/test/DegreeToRadian.test.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { degreeToRadian } from '../DegreeToRadian'
|
||||
|
||||
test('should convert degree to radian:', () => {
|
||||
const radianEqual = degreeToRadian(0)
|
||||
expect(radianEqual).toBe(0)
|
||||
})
|
||||
|
||||
test('should convert degree to radian:', () => {
|
||||
const radianEqual = degreeToRadian(45)
|
||||
expect(radianEqual).toBe(Math.PI / 4)
|
||||
})
|
||||
|
||||
test('should convert degree to radian:', () => {
|
||||
const radianEqual = degreeToRadian(90)
|
||||
expect(radianEqual).toBe(Math.PI / 2)
|
||||
})
|
||||
|
||||
test('should convert degree to radian:', () => {
|
||||
const radianEqual = degreeToRadian(180)
|
||||
expect(radianEqual).toBe(Math.PI)
|
||||
})
|
||||
Reference in New Issue
Block a user