From b2039bf371651a0b66ec16e43b200a66b457b03a Mon Sep 17 00:00:00 2001 From: e0425bed061809c5ce17450fe47dc970090a0938 Date: Fri, 2 Oct 2026 06:54:58 +0000 Subject: [PATCH] Solution 0x3363be2c74a52f6cd9663b810306764e1ea2b75da651754d869f750ffe3dc3e7 T2T-Item: 0x3363be2c74a52f6cd9663b810306764e1ea2b75da651754d869f750ffe3dc3e7 T2T-Issue: 0xc12661ad1e924639ee5738cfaa57a23385d5f9849451aac6efabf58a185daf6d --- tests/acceptance/1/CRITERIA.json | 18 ++++++++++++++++++ tests/acceptance/1/criteria.test.js | 14 ++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tests/acceptance/1/CRITERIA.json create mode 100644 tests/acceptance/1/criteria.test.js diff --git a/tests/acceptance/1/CRITERIA.json b/tests/acceptance/1/CRITERIA.json new file mode 100644 index 0000000..42eb7eb --- /dev/null +++ b/tests/acceptance/1/CRITERIA.json @@ -0,0 +1,18 @@ +{ + "schema": "elffuss-t2t/criteria@2", + "issue": 1, + "criteria": [ + { + "index": 1, + "tests": [ + "tests/acceptance/1/criteria.test.js::criterion 1" + ] + }, + { + "index": 2, + "tests": [ + "tests/acceptance/1/criteria.test.js::criterion 2" + ] + } + ] +} diff --git a/tests/acceptance/1/criteria.test.js b/tests/acceptance/1/criteria.test.js new file mode 100644 index 0000000..84650a6 --- /dev/null +++ b/tests/acceptance/1/criteria.test.js @@ -0,0 +1,14 @@ +import { test } from 'node:test' +import assert from 'node:assert/strict' +import { readFileSync } from 'node:fs' +const text = readFileSync(new URL('../../../README.md', import.meta.url), 'utf8') // the content of README.md + +test('criterion 1', () => { + // README.md contains no link whose target is `bench/` unless that directory exists in the repository. + assert.strictEqual(text.includes('bench/'), false, 'README.md should not contain a link target to bench/ unless the directory exists.') +}) + +test('criterion 2', () => { + // README.md still names the licence of the dialogue benchmark it discusses. + assert.strictEqual(text.includes('license'), true, 'README.md should name the licence of the dialogue benchmark it discusses.') +}) -- 2.49.1