Sha256: 2edc15c4b196b961b685b14bcd0f2264ef435cf09bab4505f4640730d978c50d

Contents?: true

Size: 1.21 KB

Versions: 66

Compression:

Stored size: 1.21 KB

Contents

import ArmstrongNumbers from './armstrong-numbers'

describe('Armstrong Numbers', () => {
    it('Single digit numbers are Armstrong numbers', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(5)).toBeTruthy()
    })

    xit('There are no 2 digit Armstrong numbers', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(10)).toBeFalsy()
    })

    xit('Three digit number that is an Armstrong number', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(153)).toBeTruthy()
    })

    xit('Three digit number that is not an Armstrong number', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(100)).toBeFalsy()
    })

    xit('Four digit number that is an Armstrong number', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(9474)).toBeTruthy()
    })

    xit('Four digit number that is not an Armstrong number', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(9475)).toBeFalsy()
    })

    xit('Seven digit number that is an Armstrong number', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(9926315)).toBeTruthy()
    })

    xit('Seven digit number that is not an Armstrong number', () => {
        expect(ArmstrongNumbers.isArmstrongNumber(9926314)).toBeFalsy()
    })
})

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts
trackler-2.2.1.118 tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts
trackler-2.2.1.117 tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts
trackler-2.2.1.116 tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts
trackler-2.2.1.115 tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts
trackler-2.2.1.114 tracks/typescript/exercises/armstrong-numbers/armstrong-numbers.test.ts