From 9928fcbcff7cfa1aa6ec1f8437f43485e1245f21 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 4 Apr 2023 13:51:52 -0300 Subject: test: use postprocess option in snapshots --- test/lib/content-function.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/lib') diff --git a/test/lib/content-function.js b/test/lib/content-function.js index b6177e4..692d510 100644 --- a/test/lib/content-function.js +++ b/test/lib/content-function.js @@ -70,17 +70,13 @@ export function testContentFunctions(t, message, fn) { throw new Error(`Await .load() before performing tests`); } - const [description, opts, fn] = + const [description, opts] = (typeof args[0] === 'string' ? args : ['output', ...args]); let result = evaluate(opts); - if (fn) { - result = fn(result); - } - if (opts.multiple) { result = result.map(item => item.toString()).join('\n'); } else { -- cgit 1.3.0-6-gf8a5