Skip to content

Commit 8c7bd4c

Browse files
committed
Hold SKILL.md to a way to a type's file, under either release
The SKILL.md test stopped expecting 0.9.0's type-file address so the pin could move, and with it any check that the skill gives a way to a type's file at all (cubic's review). It now asks for 0.9.0's address of its own or this page, which writes each one out, as the next release names it. SKILL.md with neither fails it.
1 parent c37cc78 commit 8c7bd4c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎e2e/skill.spec.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ test('serves every address SKILL.md gives, relative to itself or on this site',
6464
const relativeLinks = [...skill.matchAll(/\]\((?![a-z]+:|#)([^)\s]+)\)/g)].map(([, link]) => new URL(link, here).pathname)
6565
expect(relativeLinks).toEqual(expect.arrayContaining(['/h5p/skill/LICENSE', '/h5p/skill/references/authoring.md']))
6666
// Its addresses on this site, with a content type for the name it leaves to fill in, and no fragment.
67-
// Which they are moves with the release: since h5p-author 0.9.1 it names this page for a type's
68-
// file, where 0.9.0 named /h5p/build/types/<Type>.md (h5p-offline-player#180).
6967
const filled = skill.replace(/<type>/gi, 'H5P.QuestionSet')
7068
const onSite = [...new Set([...filled.matchAll(/https:\/\/missing-elements\.github\.io(\/[^\s`)>"'#]*)/g)].map(([, path]) => path))]
7169
expect(onSite).toEqual(expect.arrayContaining(['/h5p/bundles/H5P.QuestionSet.zip', '/h5p/build/']))
70+
// A type's file, at an address of its own as h5p-author 0.9.0 gives it, or from this page, which
71+
// writes each one out (the first test), as the release after it does (h5p-offline-player#180).
72+
expect(onSite.some((path) => path === '/h5p/build/types/H5P.QuestionSet.md' || path === '/h5p/skill/'), 'a way to a type\'s file').toBe(true)
7273
for (const path of [...relativeLinks, ...onSite]) expect((await request.get(path)).ok(), path).toBe(true)
7374
})

0 commit comments

Comments
 (0)