From b5a0043f5ca572b3c6bf5e1b7b58c51c621d0702 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Tue, 10 Sep 2024 12:25:21 +0100 Subject: [PATCH] fix negative match test --- packages/astro/test/content-layer.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/astro/test/content-layer.test.js b/packages/astro/test/content-layer.test.js index e51c55c1693f..6b833085df86 100644 --- a/packages/astro/test/content-layer.test.js +++ b/packages/astro/test/content-layer.test.js @@ -87,7 +87,10 @@ describe('Content Layer', () => { assert.ok(json.hasOwnProperty('probes')); assert.ok(Array.isArray(json.probes)); assert.equal(json.probes.length, 5); - assert.equal(json.probes.at(-1).id, 'philae-lander', 'Voyager probes should not be included'); + assert.ok( + json.probes.every(({ id }) => !id.startsWith('voyager')), + 'Voyager probes should not be included', + ); }); it('Returns data entry by id', async () => {