mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-10 06:52:05 +01:00
20 lines
621 B
JavaScript
20 lines
621 B
JavaScript
describe('expression formatter', function () {
|
|
var di = app.di.clone();
|
|
var formatter = di.resolve('formatter');
|
|
|
|
xit('should format number to binary by default', function() {
|
|
expect(formatter.formatString(10)).toBe("1010");
|
|
});
|
|
|
|
xit('should format number hexadecimal', function() {
|
|
expect(formatter.formatString(15, 'hex')).toBe("f");
|
|
});
|
|
|
|
xit('should format number decimal', function() {
|
|
expect(formatter.formatString(16, 'dec')).toBe('16');
|
|
});
|
|
|
|
xit('should respect padding', function() {
|
|
expect(formatter.padLeft("a", 6)).toBe("00000a");
|
|
});
|
|
}); |