{"id":18852,"library":"test-certificate-context","title":"Test Certificate Context","description":"A JSON-LD context for medical test certificates, version 1.0.2. This package provides the W3C Verifiable Credential context for medical test results, used in the DIVOC digital vaccination certificate system. It is a stable, low-traffic library with no active development since 2021. Differentiator: specifically designed for interoperable health certificates in Indian e-governance.","status":"maintenance","version":"1.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/egovernments/DIVOC#main","tags":["javascript","medical testing","w3c","certificate","context"],"install":[{"cmd":"npm install test-certificate-context","lang":"bash","label":"npm"},{"cmd":"yarn add test-certificate-context","lang":"bash","label":"yarn"},{"cmd":"pnpm add test-certificate-context","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only with a default export. CommonJS require() will fail.","wrong":"const context = require('test-certificate-context')","symbol":"context","correct":"import context from 'test-certificate-context'"},{"note":"Named export is all caps with underscores.","wrong":"import { TestCertificateV1ContextUrl } from 'test-certificate-context'","symbol":"TEST_CERTIFICATE_V1_CONTEXT_URL","correct":"import { TEST_CERTIFICATE_V1_CONTEXT_URL } from 'test-certificate-context'"},{"note":"CommonJS users must use dynamic import. Package has no default CommonJS export.","wrong":"const context = require('test-certificate-context')","symbol":"context (CommonJS)","correct":"const context = (await import('test-certificate-context')).default"}],"quickstart":{"code":"import context, { TEST_CERTIFICATE_V1_CONTEXT_URL } from 'test-certificate-context';\n\nconsole.log('Context URL:', TEST_CERTIFICATE_V1_CONTEXT_URL);\n// Context URL: https://www.w3.org/2022/credentials/examples/v1\n\n// Use the context when creating a Verifiable Credential\nimport { createVerifiableCredentialJwt } from '@transmute/vc.js';\n\nconst credential = {\n  '@context': [\n    'https://www.w3.org/2018/credentials/v1',\n    context\n  ],\n  type: ['VerifiableCredential', 'MedicalTestCertificate'],\n  issuer: process.env.ISSUER_DID ?? 'did:example:123',\n  issuanceDate: new Date().toISOString(),\n  credentialSubject: {\n    id: 'did:example:subject',\n    testResult: 'negative'\n  }\n};\n\nconsole.log('Credential context set:', JSON.stringify(credential['@context'], null, 2));","lang":"typescript","description":"Shows how to import and use the context object and URL, then create a W3C Verifiable Credential with medical test context."},"warnings":[{"fix":"Do not rely on the context URL for resolution; embed the context object directly or use a cached copy.","message":"Context URL is a placeholder example URL, not a resolvable JSON-LD document in production.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to a more current W3C Verifiable Credential framework if active development is needed.","message":"Package is no longer actively maintained since 2021.","severity":"deprecated","affected_versions":"1.0.2"},{"fix":"Use dynamic import: const context = (await import('test-certificate-context')).default;","message":"ESM-only package; cannot be required with require().","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Import as: import { TEST_CERTIFICATE_V1_CONTEXT_URL } from 'test-certificate-context';","message":"Named export uses SCREAMING_SNAKE_CASE, which may conflict with linting rules or expectations.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use dynamic import: const context = await import('test-certificate-context');","cause":"Package is ESM-only and cannot be required with require().","error":"Cannot find module 'test-certificate-context'"},{"fix":"Change to import syntax or use dynamic import.","cause":"Trying to use require() on an ESM-only package.","error":"ERR_REQUIRE_ESM: require() of ES Module"},{"fix":"Import as: import { TEST_CERTIFICATE_V1_CONTEXT_URL } from 'test-certificate-context';","cause":"Incorrect case for named import.","error":"Unknown variable or property: TEST_CERTIFICATE_V1_CONTEXT_URL"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}