From 3ae580ca60113113a3be999fd2436017cd3b5b51 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sat, 30 Apr 2022 10:17:43 -0400 Subject: [PATCH] Add failing tests demonstrating expected order --- test/all.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/all.js b/test/all.js index edeb4f8..f770508 100644 --- a/test/all.js +++ b/test/all.js @@ -84,5 +84,27 @@ test('all together now', (t) => { ] ) + t.deepEqual( + selectAll( + 'h1, h2', + u('root', [ + u('h1', 'Alpha'), + u('h2', 'Alpha.1'), + u('h2', 'Alpha.2'), + u('h1', 'Bravo'), + u('h2', 'Bravo.1'), + u('h2', 'Bravo.2') + ]) + ), + [ + u('h1', 'Alpha'), + u('h2', 'Alpha.1'), + u('h2', 'Alpha.2'), + u('h1', 'Bravo'), + u('h2', 'Bravo.1'), + u('h2', 'Bravo.2') + ] + ) + t.end() })