{"size": 603, "ext": "js", "max_stars_repo_path": "src/image/core/__tests__/loadTIFF.js", "max_stars_repo_name": "lexotrion/vzor-image-js", "max_stars_repo_stars_event_min_datetime": "2019-03-21T19:56:50.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-21T19:56:50.000Z", "max_issues_repo_path": "src/image/core/__tests__/loadTIFF.js", "max_issues_repo_name": "lexotrion/vzor-image-js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/image/core/__tests__/loadTIFF.js", "max_forks_repo_name": "lexotrion/vzor-image-js", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.125, "max_line_length": 64, "alphanum_fraction": 0.5339966833}
import { load } from 'test/common';

describe('Load TIFF', function () {
  const tests = [
    // ['name', components, alpha, bitDepth]
    ['grey8', 1, 0, 8],
    ['grey16', 1, 0, 16]
  ];

  tests.forEach(function (test) {
    it(test[0], function () {
      return load(`format/${test[0]}.tif`).then(function (img) {
        expect(img.components).toBe(test[1]);
        expect(img.alpha).toBe(test[2]);
        expect(img.bitDepth).toBe(test[3]);
        expect(img.meta).toMatchObject({
          tiff: expect.any(Object),
          exif: expect.any(Object)
        });
      });
    });
  });
});
