Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@medic/contact-summary-testing

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medic/contact-summary-testing

Contact Summary test will load your contact-settings.js or contact-summary-templated.js. Then it will loop through the folders in your contact summary json exmaple folders. Then execute your contact.json, lineage.json, and reports.json against the contac

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

Running Tests With Contact Summary Tests

Contact Summary test will load your contact-settings.js or contact-summary-templated.js. Then it will loop through the folders in your contact summary json exmaple folders. Then execute your contact.json, lineage.json, and reports.json against the contact-summary. This returns an output json which is then compared against the expected.json in your test folders.

Via command line

medic-contact-summary-test path_to_contact-summary.js path_to_tests_contact_summary_json

An example using the standard config tests

medic-contact-summary-test medic-webapp/tree/master/config/standard medic-webapp/tree/master/config/standard/tests/contact-summary

Expected Files

Folder Structure

The json files need to be in this directory structure to be looped over and tested against the contact-summary that gets loaded.

NOTE: Lineage and reports files are required but not required to contain data.

── contact-summary
│   ├── immunization
│   │   ├── contact.json
│   │   ├── expected-output.json
│   │   ├── lineage.json
│   │   └── reports.json

Contact JSON

This file is a representation of data that would be submitted through the app via a form. It should mimic the data collected

Reports JSON

A json file that represents a report that is being submitted through the application. When the contact summary is executed it will affect the output based on conditions set.

Lineage

Represents the lineage for a contact and the available use cases, vaccines, and other details. Used when processing through the contact summary.

Expected Output

This file contains the data as if it were processed through the app and contact summary details were applied to it. Returning expected fields, cards, and context.

FAQs

Package last updated on 22 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc