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.') +})