exiftool-vendored
Version:
Efficient, cross-platform access to ExifTool
25 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const node_os_1 = require("node:os");
const node_path_1 = require("node:path");
const IsWarning_1 = require("./IsWarning");
const _chai_spec_1 = require("./_chai.spec");
describe("IsWarning", () => {
for (const msg of [
"Warning: Duplicate MakerNoteUnknown tag in ExifIFD",
"Warning: ICC_Profile deleted. Image colors may be affected",
"Warning: Tag 'INVALID_TAG_NAME' is not defined",
`Error: Nothing to write - ${(0, node_path_1.join)((0, node_os_1.tmpdir)(), "test.xmp")}`,
"Nothing to do.",
]) {
it(`accepts ${msg}`, () => {
(0, _chai_spec_1.expect)((0, IsWarning_1.isWarning)(msg)).to.eql(true);
});
}
for (const msg of ["Error: File not found - nonexistant.jpg"]) {
it(`rejects ${msg}`, () => {
(0, _chai_spec_1.expect)((0, IsWarning_1.isWarning)(msg)).to.eql(false);
});
}
});
//# sourceMappingURL=IsWarning.spec.js.map