'use strict'; const assert = require('node:assert/strict'); const { spawnSync } = require('node:child_process'); const path = require('node:path'); const test = require('node:test'); test('hottest query hook retains unliked comments and is query-local', () => { const script = path.resolve(__dirname, 'comment-order-behavior.php'); const result = spawnSync('php', [script], { encoding: 'utf8' }); assert.equal(result.status, 0, result.stderr || result.stdout); assert.match(result.stdout, /Hottest comment query behavior passed/); });