UNPKG

exiftool-vendored

Version:
35 lines 1.75 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const promises_1 = require("node:fs/promises"); const node_path_1 = __importDefault(require("node:path")); const ExifTool_1 = require("./ExifTool"); const _chai_spec_1 = require("./_chai.spec"); after(() => (0, _chai_spec_1.end)(ExifTool_1.exiftool)); describe("ReadRawTask", () => { describe("non-alphanumeric filenames", () => { for (const { str, desc } of _chai_spec_1.NonAlphaStrings) { it("reads with " + desc, async () => { (0, _chai_spec_1.expect)(ExifTool_1.exiftool.options.useMWG).to.equal(true); const FileName = str + ".jpg"; const dest = node_path_1.default.join((0, _chai_spec_1.tmpdir)(), FileName); await (0, _chai_spec_1.mkdirp)((0, _chai_spec_1.tmpdir)()); await (0, promises_1.copyFile)(node_path_1.default.join(_chai_spec_1.testDir, "quotes.jpg"), dest); const t = await ExifTool_1.exiftool.readRaw(dest); (0, _chai_spec_1.expect)(t).to.containSubset({ MIMEType: "image/jpeg", FileName, DateTimeOriginal: "2016:08:12 13:28:50.728", Make: "Apple", Model: "iPhone 7 Plus", ImageDescription: "image description for quotes test", LastKeywordXMP: ["Test", "examples", "beach"], Title: _chai_spec_1.UnicodeTestMessage, }); }); } }); }); //# sourceMappingURL=ReadRawTask.spec.js.map