X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Flib%2Fcommon.js;h=20911c1d5d745eb0749df5dd69a58cbd173163f2;hb=3d41f4dd33d59d0c11c97ddeb51ab22d851b93e6;hp=fe0240718bf8192f8e3761219ef33fd665e8d544;hpb=cf9590ecbcd4b0a7c01f153cacade619518f84f0;p=squeep-indieauth-helper diff --git a/test/lib/common.js b/test/lib/common.js index fe02407..20911c1 100644 --- a/test/lib/common.js +++ b/test/lib/common.js @@ -9,12 +9,12 @@ describe('common', function () { it('names a file path', function () { const filename = 'lib/foo/bar.js'; const result = common.fileScope(filename)('baz'); - assert.strictEqual(result, 'bar:baz'); + assert(result.endsWith(':bar:baz')); }); it('names an index path', function () { const filename = 'lib/foo/index.js'; const result = common.fileScope(filename)('baz'); - assert.strictEqual(result, 'foo:baz'); + assert(result.endsWith(':foo:baz')); }); }); // fileScope @@ -120,4 +120,14 @@ describe('common', function () { }); }); // properURLComponentName + describe('formData', function () { + it('covers', function () { + const result = common.formData({ + key: 'value', + foo: 'bar', + }); + assert.strictEqual(result, 'key=value&foo=bar'); + }); + }); // formData + }); // common \ No newline at end of file