From 19722a2739ecf4a4c7959adcf829fb12e2f4353b Mon Sep 17 00:00:00 2001 From: Yang Jun Date: Tue, 7 Jul 2026 23:27:57 +0800 Subject: [PATCH] test: drop TagImplOptions-specific e2e coverage (#839) Remove #570 v9 object-literal registration test and unused metadata_file setup in #573. Co-authored-by: Cursor --- test/e2e/issues.spec.ts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/test/e2e/issues.spec.ts b/test/e2e/issues.spec.ts index d2eb8b07d..cc2f36e72 100644 --- a/test/e2e/issues.spec.ts +++ b/test/e2e/issues.spec.ts @@ -1,21 +1,9 @@ -import { TopLevelToken, TagToken, Tokenizer, Context, Liquid, Drop, toValueSync, LiquidError, IfTag, Tag } from '../..' +import { Tokenizer, Context, Liquid, Drop, toValueSync, LiquidError, IfTag } from '../..' import { spawnSync } from 'child_process' import { resolve as resolvePath } from 'path' const LiquidUMD = require('../../dist/liquid.browser.umd.js').Liquid describe('Issues', function () { - class MetadataFileTag extends Tag { - str: string - constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) { - super(token, remainTokens, liquid) - this.str = token.args - } - async render (ctx: Context) { - const content = await Promise.resolve(`{{${this.str}}}`) - return this.liquid.parseAndRender(content.toString(), ctx) - } - } - it('unicode blanks are not properly treated #221', async () => { const engine = new Liquid({ strictVariables: true, strictFilters: true }) const html = engine.parseAndRenderSync('{{huh | truncate: 11}}', { huh: 'fdsafdsafdsafdsaaaaa' }) @@ -374,17 +362,8 @@ describe('Issues', function () { const html = await liquid.parseAndRender(tpl) expect(html).toMatch(/^\s*This is a love or luck potion.\s+This is a strength or health or love potion.\s*$/) }) - it('tag registration compatible to v9 #570', async () => { - const liquid = new Liquid() - liquid.registerTag('metadata_file', MetadataFileTag) - const tpl = '{% metadata_file foo %}' - const ctx = { foo: 'FOO' } - const html = await liquid.parseAndRender(tpl, ctx) - expect(html).toBe('FOO') - }) it('date filter should return parsed input when no format is provided #573', async () => { const liquid = new Liquid() - liquid.registerTag('metadata_file', MetadataFileTag) const tpl = `{{ 'now' | date }}` const html = await liquid.parseAndRender(tpl) // sample: Thursday, February 2, 2023 at 6:25 pm +0000