source: imaps-frontend/node_modules/es-iterator-helpers/test/tests.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 932 bytes
Line 
1'use strict';
2
3var data = {
4 anchor: { arg: 'bar"baz"', expected: '<a name="bar&quot;baz&quot;">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&quot;red&quot;green">foo</font>' },
10 fontsize: { arg: '10"large"small', expected: '<font size="10&quot;large&quot;small">foo</font>' },
11 italics: '<i>foo</i>',
12 link: { arg: 'url"http://"', expected: '<a href="url&quot;http://&quot;">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};
Note: See TracBrowser for help on using the repository browser.