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

21 lines
547 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);
}
});
}
};