mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
Update Binary Exponentiation algorithm file to comply with Javascript standard rules
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { exponent } from '../BinaryExponentiationIterative'
|
||||
|
||||
describe('exponent', () => {
|
||||
it('should return 1 when power is 0', () => {
|
||||
expect(exponent(5, 0)).toBe(1)
|
||||
})
|
||||
it('should return 1 when power is 0', () => {
|
||||
expect(exponent(5, 0)).toBe(1)
|
||||
})
|
||||
|
||||
it('should return 0 when base is 0', () => {
|
||||
expect(exponent(0, 7)).toBe(0)
|
||||
})
|
||||
it('should return 0 when base is 0', () => {
|
||||
expect(exponent(0, 7)).toBe(0)
|
||||
})
|
||||
|
||||
it('should return the value of a base raised to a power', () => {
|
||||
expect(exponent(3, 5)).toBe(243)
|
||||
})
|
||||
})
|
||||
it('should return the value of a base raised to a power', () => {
|
||||
expect(exponent(3, 5)).toBe(243)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user