Created
April 1, 2021 17:23
-
-
Save mdr/7af329941ee9d9c530240e4a7a6e27c4 to your computer and use it in GitHub Desktop.
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
const loadSpec = async () => ({ | |
given: () => "I have 100 shares of MSFT stock", | |
when: () => "When I ask to sell 20 shares of MSFT stock", | |
then: () => "Then I should have 80 shares of MSFT stock" | |
}) | |
const printSpec = async () => { | |
const { given, when, then } = await loadSpec() | |
console.log(given()) | |
console.log(when()) | |
console.log(then()) | |
} | |
await printSpec() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment