🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@holochain/diorama

Package Overview
Dependencies
Maintainers
8
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holochain/diorama

Javascript module for orchestrating single and multi-agent scenario tests against DNAs running in the Holochain conductor

latest
Source
npmnpm
Version
0.3.0-rc.2
Version published
Maintainers
8
Created
Source

diorama

The first Holochain test orchestrator.

Basic usage

const {Diorama} = require('@holochain/diorama')
const dnaBlog = Diorama.dna('path/to/blog.dna.json', 'blog')
const dnaComments = Diorama.dna('path/to/comments.dna.json', 'comments')

const diorama = new Diorama({
  instances: {
    aliceBlog: dnaBlog,
    aliceComments: dnaComments,
    bobBlog: dnaBlog,
    bobComments: dnaComments
  },
  bridges: [
    Diorama.bridge('handle', aliceBlog, aliceComments),
    Diorama.bridge('handle', bobBlog, bobComments),
  ]
})

diorama.registerScenario('a test', async (s, {aliceBlog, bobBlog}) => {
    await aliceBlog.call('blog', 'create_post', {
        content: 'holo wurld'
    })
    await s.consistent()
    const posts = await bobBlog.call('blog', 'list_posts')
    // write some assertions
})

diorama.run()

Stay tuned

Much more documention to come!

Keywords

holochain

FAQs

Package last updated on 01 Aug 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