Podcasts sort with a leading "A" or "An" set aside too (#481)
A Question of Science files under Q, as The Rest Is Science does under R. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy
This commit is contained in:
@@ -28,11 +28,13 @@ test('esc makes text safe to put in markup and attributes', () => {
|
||||
assert.equal(run('esc(undefined)'), '');
|
||||
});
|
||||
|
||||
test('names sort as a shelf files them, a leading The aside (#481)', () => {
|
||||
const names = ['The Rest Is Science', 'science weekly', 'Theory of Everything', 'Episode 10', 'Episode 2', 'the Daily', 'Radiolab'];
|
||||
test('names sort as a shelf files them, a leading The, A or An aside (#481)', () => {
|
||||
const names = ['The Rest Is Science', 'science weekly', 'Theory of Everything', 'Episode 10', 'Episode 2', 'the Daily', 'Radiolab',
|
||||
'A Question of Science', 'An Hour', 'Anchor', 'Abba'];
|
||||
// As JSON: an array from the page's VM is of another realm, which deepEqual tells apart.
|
||||
assert.deepEqual(JSON.parse(run(`JSON.stringify(${JSON.stringify(names)}.sort(nameOrder))`)),
|
||||
['the Daily', 'Episode 2', 'Episode 10', 'Radiolab', 'The Rest Is Science', 'science weekly', 'Theory of Everything']);
|
||||
['Abba', 'Anchor', 'the Daily', 'Episode 2', 'Episode 10', 'An Hour', 'A Question of Science', 'Radiolab',
|
||||
'The Rest Is Science', 'science weekly', 'Theory of Everything']);
|
||||
});
|
||||
|
||||
test('webUrl keeps only web addresses from a feed', () => {
|
||||
|
||||
Reference in New Issue
Block a user