Skip to content

Commit

Permalink
test: rename generic test titles (#4453)
Browse files Browse the repository at this point in the history
These tests failed while in-development of
#4452 and it really confused
me. Based on how the title is written, I initially thought that it was
making sure that `.selector` (etc.) for the DqElement prototype function
was never called. But what it's really making sure is that the
`.selector` (etc.) property is not called for the one node.

The reason that distinction matters is because `processAggregate` calls
`nodeSerializer` which in turn calls the `toJSON` method of a DqElement,
which calls the `.selector` (etc.) property. So it would be impossible
to never call the DqElement properties.
  • Loading branch information
straker committed May 8, 2024
1 parent b523ace commit 00b9fba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/core/reporters/helpers/process-aggregate.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ describe('helpers.processAggregate', function () {
);
});

it('should not call DqElement.selector', () => {
it('should not call the nodes selector property', () => {
const dqElm = new axe.utils.DqElement(fixture);
Object.defineProperty(dqElm, 'selector', {
get() {
Expand Down Expand Up @@ -381,7 +381,7 @@ describe('helpers.processAggregate', function () {
);
});

it('should not call DqElement.ancestry', () => {
it('should not call the nodes ancestry property', () => {
const dqElm = new axe.utils.DqElement(fixture, options, {
selector: ['div'] // prevent axe._selectorData error
});
Expand Down Expand Up @@ -446,7 +446,7 @@ describe('helpers.processAggregate', function () {
);
});

it('should not call DqElement.xpath', () => {
it('should not call the nodes xpath property', () => {
const dqElm = new axe.utils.DqElement(fixture, options, {
selector: ['div'] // prevent axe._selectorData error
});
Expand Down

0 comments on commit 00b9fba

Please sign in to comment.