2022-10-14 18:25:50 +02:00
|
|
|
import { PasswordHistoryView } from "@bitwarden/common/models/view/password-history.view";
|
2022-08-05 00:07:24 +02:00
|
|
|
|
|
|
|
describe("PasswordHistoryView", () => {
|
|
|
|
it("fromJSON initializes nested objects", () => {
|
|
|
|
const lastUsedDate = new Date();
|
|
|
|
|
|
|
|
const actual = PasswordHistoryView.fromJSON({
|
|
|
|
lastUsedDate: lastUsedDate.toISOString(),
|
|
|
|
});
|
|
|
|
|
|
|
|
expect(actual.lastUsedDate).toEqual(lastUsedDate);
|
|
|
|
});
|
|
|
|
});
|