| 123456789101112131415 |
- import { test } from 'node:test';
- import assert from 'node:assert/strict';
- import { spawnSync } from 'node:child_process';
- test('old paid collection entrypoints stop before loading credentials or a collector', () => {
- for (const args of [
- ['scripts/collect-review-coverage.cjs', '1'],
- ['scripts/collect-product-review-sample.cjs', 'call', 'no-network-test', 'jd', '1', '1'],
- ]) {
- const result = spawnSync(process.execPath, args, { encoding: 'utf8', windowsHide: true, timeout: 3000 });
- assert.equal(result.status, 1);
- assert.match(result.stderr, /PAID_COLLECTION_STOPPED/);
- assert.doesNotMatch(result.stdout + result.stderr, /MODULE_NOT_FOUND|AUTH_REQUIRED|started.*true/);
- }
- });
|