Skip to content

Instantly share code, notes, and snippets.

@bshepherdson
Created April 18, 2018 15:06
Show Gist options
  • Save bshepherdson/bed89718d14bbd07957a31e4109b8261 to your computer and use it in GitHub Desktop.
Save bshepherdson/bed89718d14bbd07957a31e4109b8261 to your computer and use it in GitHub Desktop.
testAsync
| p |
self timeout: 100.
p := Promise new: [ :model | [ model value: 7 ] valueWithTimeout: 300 ].
p then: [ :x | self assert: x equals: 7. self finished ] catch: [ self signalFailure: 'Promise error' ].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment