-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b66af7
commit cf02a55
Showing
2 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import test from 'ava' | ||
import { render } from '../source/template' | ||
|
||
test('renders a template', t => { | ||
t.is( | ||
render('This is a string with {{variable}}'), | ||
'This is a string with {{variable}}' | ||
) | ||
t.is( | ||
render('This is a string with {{two}} {{variables}}'), | ||
'This is a string with {{two}} {{variables}}' | ||
) | ||
t.is( | ||
render('Replace variable with {{text}}', { text: 'a value' }), | ||
'Replace variable with a value' | ||
) | ||
t.is( | ||
render('Replace {{this}} but not {{that}}', { this: '🤠' }), | ||
'Replace 🤠 but not {{that}}' | ||
) | ||
t.is( | ||
render('Replace both {{one}} {{two}}', { one: '🐍', two: '🦝' }), | ||
'Replace both 🐍 🦝' | ||
) | ||
}) |
This file was deleted.
Oops, something went wrong.