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

feynman

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feynman - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

6

lib/feynman.js

@@ -110,3 +110,7 @@ 'use strict'

remember: (item, value) => state.set(item, value),
recall: item => state.get(item),
recall: item => {
if (!state.has(item))
throw new Error(`I do not remember anything about '${item}', sorry`)
return state.get(item)
}
}

@@ -113,0 +117,0 @@ },

@@ -304,6 +304,7 @@ 'use strict'

describe('Memory', () => {
const perspective = Perspective('test', handle =>
Memory.addToPerspective(handle)
)
it('allows an actor to remember state', async () => {
const perspective = Perspective('test', handle =>
Memory.addToPerspective(handle)
)
const joe = Actor(perspective, { ...Memory.abilities() })

@@ -313,3 +314,15 @@ await joe.attemptsTo(Remember('thing').is('something'))

})
it('throws when asked for something it can\'t remember', async () => {
const joe = Actor(perspective, { ...Memory.abilities() })
let err
try {
await joe.asks(Memory.about('something unknown'))
} catch (e) {
err = e
}
assert(err, 'Expected it to throw')
assert(err.message.match(/something unknown/), 'The error message doesn\'t look right')
})
})
})

2

package.json
{
"name": "feynman",
"version": "0.0.6",
"version": "0.0.7",
"description": "A screenplay pattern library for javascript",

@@ -5,0 +5,0 @@ "main": "lib/feynman.js",

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