Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix: add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Feb 20, 2019
1 parent 24e5610 commit aa477da
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import NumberFormatterRegistry from '../src/NumberFormatterRegistry';
import NumberFormatter from '../src/NumberFormatter';
import { NumberFormats } from '../src';

describe('NumberFormatterRegistry', () => {
let registry: NumberFormatterRegistry;
beforeEach(() => {
registry = new NumberFormatterRegistry();
});
it('has SMART_NUMBER as default formatter out of the box', () => {
expect(registry.getDefaultKey()).toBe(NumberFormats.SMART_NUMBER);
});
describe('.get(format)', () => {
it('creates and returns a new formatter if does not exist', () => {
const formatter = registry.get('.2f');
Expand Down

0 comments on commit aa477da

Please sign in to comment.