Umama-at-Bluchip/Quick-UI
0
1'use strict';2 3var data = {4 anchor: { arg: 'bar"baz"', expected: '<a name="bar"baz"">foo</a>' },5 big: '<big>foo</big>',6 blink: '<blink>foo</blink>',7 bold: '<b>foo</b>',8 fixed: '<tt>foo</tt>',9 fontcolor: { arg: 'blue"red"green', expected: '<font color="blue"red"green">foo</font>' },10 fontsize: { arg: '10"large"small', expected: '<font size="10"large"small">foo</font>' },11 italics: '<i>foo</i>',12 link: { arg: 'url"http://"', expected: '<a href="url"http://"">foo</a>' },13 small: '<small>foo</small>',14 strike: '<strike>foo</strike>',15 sub: '<sub>foo</sub>',16 sup: '<sup>foo</sup>'17};18 19module.exports = function (method, name, t) {20 var result = data[name] || {};21 var expected = typeof result === 'string' ? result : result.expected;22 var actual = typeof result === 'string' ? method('foo') : method('foo', result.arg);23 24 t.equal(actual, expected, name + ': got expected result');25};26 