git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 4ef01e25f0db10ce812670a695cf71a5ac9aba76

update deps and tests

Norton Wang committed on 4/29/2018, 2:08:20 PM
Parent: af575337e9eaa5b2166aeec5170d6368494c9404

Files changed

actor.jschanged
package-lock.jsonchanged
package.jsonchanged
tests/index.jschanged
actor.jsView
@@ -70,21 +70,31 @@
7070 }
7171 this.ticks += count
7272 }
7373
74 + /**
75 + * creates an actor from a module and code
76 + * @param {Module} mod - the module
77 + * @param {Buffer} code - the code
78 + */
7479 newActor (mod, code) {
7580 const modRef = this.createModule(mod, code)
7681 return this.createActor(modRef)
7782 }
7883
84 + /**
85 + * creates a modref from a module and code
86 + * @param {Module} mod - the module
87 + * @param {Buffer} code - the code
88 + */
7989 createModule (mod, code) {
8090 const id = this._generateNextId()
8191 return this.hypervisor.createModule(mod, code, id)
8292 }
93 +
8394 /**
84- * creates an actor
85- * @param {Integer} type - the type id for the container
86- * @param {Object} message - an intial [message](https://github.com/primea/js-primea-message) to send newly created actor
95 + * creates an actor from a modref
96 + * @param {ModuleRef} modRef - the modref
8797 */
8898 createActor (modRef) {
8999 const id = this._generateNextId()
90100 return this.hypervisor.createActor(modRef, id)
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 352329 bytes
New file size: 350733 bytes
package.jsonView
@@ -30,9 +30,9 @@
3030 "license": "MPL-2.0",
3131 "dependencies": {
3232 "binary-search-insert": "^1.0.3",
3333 "events": "^2.0.0",
34- "primea-objects": "0.0.5",
34 + "primea-objects": "0.0.6",
3535 "safe-buffer": "^5.1.2"
3636 },
3737 "devDependencies": {
3838 "coveralls": "^3.0.0",
tests/index.jsView
@@ -51,13 +51,13 @@
5151 }
5252 load () {
5353 const loadedID = this.actor.storage[0].id.toString('hex')
5454 const link = this.actor.storage[1]
55- // const loadedMod = this.actor.storage[2]
55 + const loadedMod = this.actor.storage[2]
5656 const loadedFuncref = this.actor.storage[3]
5757 t.equals(id, loadedID, 'should load id correctly')
5858 t.equals(link['/'].toString('hex'), '6fe3180f700090697285ac1e0e8dc400259373d7', 'should load link correctly')
59- // t.deepEquals(loadedMod, mod)
59 + t.deepEquals(loadedMod, mod)
6060 t.deepEquals(funcref, loadedFuncref)
6161 }
6262 }
6363

Built with git-ssb-web