import { Assert } from '@japa/assert';
export const assertAttachements = () => function () {
    Assert.macro('attachmentExists', function (fakeDisk, attachment, doesExist = true) {
        const path = attachment?.url.replace('/drive/fakes/', '');
        if (doesExist) {
            this.notEqual(path, undefined);
            fakeDisk.assertExists(path);
        }
        else {
            if (path !== undefined)
                fakeDisk.assertMissing(path);
        }
    });
    Assert.macro('attachmentEqual', function (attachmentA, attachmentB) {
        return attachmentA?.url === attachmentB?.url;
    });
};
//# sourceMappingURL=assert_attachment.js.map