Skip to content

Commit

Permalink
Refine test comment for clarity on time mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKale committed Dec 5, 2024
1 parent 5a12b5b commit 710745d
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/server/src/metadata/verifyAttestationWithMetadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,24 @@ import { verifyAttestationWithMetadata } from './verifyAttestationWithMetadata.t
import type { MetadataStatement } from '../metadata/mdsTypes.ts';
import { isoBase64URL } from '../helpers/iso/index.ts';

Deno.test('should verify attestation with metadata (android-safetynet)', async () => {
// notBefore: 2022-01-25T10:00:34.000Z,
// notAfter: 2022-04-25T10:00:33.000Z
Deno.test.only('should verify attestation with metadata (android-safetynet)', async () => {
// Faking time to something that'll satisfy all of these ranges:
// {
// notBefore: 2022-01-25T10:00:34.000Z,
// notAfter: 2022-04-25T10:00:33.000Z
// }
// {
// notBefore: 2020-08-13T00:00:42.000Z,
// notAfter: 2027-09-30T00:00:42.000Z
// }
// {
// notBefore: 2020-06-19T00:00:42.000Z,
// notAfter: 2028-01-28T00:00:42.000Z
// }
// {
// notBefore: 1998-09-01T12:00:00.000Z,
// notAfter: 2028-01-28T12:00:00.000Z
// }
const fakedNow = new FakeTime(new Date('2022-02-01T00:00:00.000Z'));

const metadataStatementJSONSafetyNet: MetadataStatement = {
Expand Down

0 comments on commit 710745d

Please sign in to comment.