var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
import chaiAsPromised from 'chai-as-promised';
import chai, { expect } from 'chai';
import { getCurrentTimeInHighPrecision } from '../../src/utils/time.js';
import { Jws } from '../../src/index.js';
import { RecordsRead } from '../../src/interfaces/records-read.js';
import { TestDataGenerator } from '../utils/test-data-generator.js';
chai.use(chaiAsPromised);
describe('RecordsRead', () => {
    if (process.env.TESTSOFF === 'true') {
        return;
    }
    describe('create()', () => {
        it('should use `messageTimestamp` as is if given', () => __awaiter(void 0, void 0, void 0, function* () {
            const alice = yield TestDataGenerator.generatePersona();
            const currentTime = getCurrentTimeInHighPrecision();
            const recordsRead = yield RecordsRead.create({
                recordId: 'anything',
                authorizationSignatureInput: Jws.createSignatureInput(alice),
                date: currentTime
            });
            expect(recordsRead.message.descriptor.messageTimestamp).to.equal(currentTime);
        }));
    });
});
//# sourceMappingURL=records-read.spec.js.map