Passed
Branch master (b8a2ae)
by Samson
02:23
created

nverter()ꞌ)   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
const assert = require('assert');
2
3
const TestCase = require('./TestCase');
4
const GeezConverter = require('../src/Converter/GeezConverter');
5
const NotAnIntegerArgumentException = require('../src/Exception/NotAnIntegerArgumentException');
6
7
const geezConverter = new GeezConverter();
8
9
describe('GeezConverterTest', function () {
10
11
    describe('#test_geez_converter()', function () {
12
        it('should convert ascii number to geez', function () {
13
            TestCase.geezNumberTestDataProvider().forEach(([$number, $geez_number]) => {
14
                $result = geezConverter.convert($number);
0 ignored issues
show
Bug introduced by
The variable $result seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.$result.
Loading history...
15
                assert.equal($geez_number, $result);
16
            });
17
        });
18
    });
19
20
    describe('#test_invalid_number_throw_exception()', function () {
21
        it('should throws NotAnIntegerArgumentException', function () {
22
            TestCase.invalidNumberDataProvider().forEach(($number) => {
23
                assert.throws(() => {
24
                    geezConverter.convert($number);
25
                }, NotAnIntegerArgumentException);
26
            });
27
        });
28
    });
29
30
});
31