Skip to content

Commit

Permalink
rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
sadorlovsky committed Feb 13, 2020
1 parent 0b66af7 commit cf02a55
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
25 changes: 25 additions & 0 deletions test/template.test.ts
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 🐍 🦝'
)
})
10 changes: 0 additions & 10 deletions test/template.ts

This file was deleted.

0 comments on commit cf02a55

Please sign in to comment.