{"size": 722, "ext": "js", "max_stars_repo_path": "assets/some_spec_transformed.js", "max_stars_repo_name": "UnicodeSnowman/ng-transmogrify", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/some_spec_transformed.js", "max_issues_repo_name": "UnicodeSnowman/ng-transmogrify", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/some_spec_transformed.js", "max_forks_repo_name": "UnicodeSnowman/ng-transmogrify", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.7857142857, "max_line_length": 73, "alphanum_fraction": 0.6578947368}
import LookupModule from "../app/common/lookup";
import htInputFormatAreaModule from "../app/common/ht_input_format_area";
import {formatters} from "../../support/matchers";

describe("htInputFormatArea", () => {
  let formatter;
  let localizationContext;

  beforeEach(() => {
    angular.mock.module(htInputFormatAreaModule, LookupModule);
    jasmine.addMatchers(formatters);

    inject((htInputFormatArea, _Lookup_) => {
      formatter = htInputFormatArea;

      localizationContext = {
        area_unit_id: Lookup.AreaUnit.SM.id
      };
    });
  });

  describe("formatting", () => {
    it("formats a number", () => {
      expect(formatter).toFormat(1000, "1,000 m²", localizationContext);
    });
  });
});
