forked from holochain/dev-camp-tests-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d2c58c
commit 8146c52
Showing
11 changed files
with
1,657 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist/ | ||
node_modules/ | ||
target/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
test | ||
bundle.json | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Holochain App Name", | ||
"description": "A Holochain app", | ||
"authors": [ | ||
{ | ||
"indentifier": "Author Name <[email protected]>", | ||
"public_key_source": "", | ||
"signature": "" | ||
} | ||
], | ||
"version": "0.1.0", | ||
"dht": {}, | ||
"properties": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// This test file uses the tape testing framework. | ||
// To learn more, go here: https://github.com/substack/tape | ||
const test = require('tape'); | ||
const Container = require('@holochain/holochain-nodejs'); | ||
|
||
// instantiate an app from the DNA JSON bundle | ||
const app = Container.loadAndInstantiate("dist/bundle.json") | ||
|
||
// activate the new instance | ||
app.start() | ||
|
||
test('commit', (t) => { | ||
const result = app.call("people", "main", "hash_post", JSON.stringify({ content: "test" })) | ||
t.equal(JSON.parse(result), "QmaErP4TAA7C39JfDFqzq3R57GnhevtoVC7H5eWK9r8hWU") | ||
t.end() | ||
}) |
Oops, something went wrong.