Skip to content

Commit

Permalink
Tests: add JavaScript test coverage for prototype-property-name query
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Nov 2, 2024
1 parent 713d6bb commit 0fff170
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/js/searchtools.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,29 @@ describe('Basic html theme search', function() {

});

describe('can handle edge-case search queries', function() {

it('can search for the javascript prototype property', function() {
eval(loadFixture("ecmascript/searchindex.js"));

searchParameters = Search._parseQuery('__proto__');

hits = [
[
'index',
'Object.__proto__',
'#Object.__proto__',
'JavaScript attribute, in ECMAScript',
16,
'index.rst',
'object'
]
];
expect(Search._performSearch(...searchParameters)).toEqual(hits);
});

});

});

describe("htmlToText", function() {
Expand Down

0 comments on commit 0fff170

Please sign in to comment.