0.3.0-rc.2 • Published 5 years ago

@holochain/diorama v0.3.0-rc.2

Weekly downloads
-
License
GPL-3
Repository
github
Last release
5 years ago

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!

0.3.0-rc.2

5 years ago

0.3.0-rc.1

5 years ago

0.2.0-rc.1

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.1-rc.2

5 years ago

0.1.1-rc.1

5 years ago

0.1.0-rc13

5 years ago

0.1.0-rc12

5 years ago

0.1.0-rc11

5 years ago

0.1.0-rc10

5 years ago

0.1.0-rc9

5 years ago

0.1.0-rc8

5 years ago

0.1.0-rc7

5 years ago

0.1.0-rc6

5 years ago

0.1.0-rc5

5 years ago

0.1.0-rc4

5 years ago

0.1.0-rc3

5 years ago

0.1.0-rc2

5 years ago

0.1.0-rc1

5 years ago