Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created March 5, 2013 19:35
Show Gist options
  • Save eduardolundgren/5093454 to your computer and use it in GitHub Desktop.
Save eduardolundgren/5093454 to your computer and use it in GitHub Desktop.
function getContent(json) {
return '<div>' + json.html + '</div>';
}
// roda a funcao atual
getContent({
html: 'dummy'
});
// Assumindo que o codigo atual eh o correto, essa funcao retorna: '<div>dummy</div>'
// No teu test tu ia fazer:
assert( getContent({ html: 'dummy' }), '<div>dummy</div>' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment