Last active
September 11, 2018 21:35
-
-
Save chris-feist/0bded3f5f683fec7f7248bb08650ddd8 to your computer and use it in GitHub Desktop.
Sample source code for babel-plugin-testable
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
// @testable | |
const cache = {}; | |
// @testable | |
function getKey(firstName, lastName) { | |
return `${firstName}_${lastName}`; | |
} | |
export const putUser = (user) => { | |
const key = getKey(user.firstName, user.lastName); | |
cache[key] = { | |
data: user, | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment