1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00
react-templates/test/src/utils.spec.js
2017-06-29 10:35:15 +03:00

21 lines
538 B
JavaScript

'use strict'
const utils = require('../../src/utils')
module.exports = {
runTests(test) {
test('test convertText', t => {
const texts = [
{input: '{}', expected: '()'},
{input: "a {'b'}", expected: '"a "+(\'b\')'}
]
t.plan(texts.length)
texts.forEach(check)
function check(testData) {
const r = utils.convertText({}, {}, testData.input)
t.equal(r, testData.expected)
}
})
}
}