Skip to content

Commit

Permalink
test: reset counters before running a styling test (#45670)
Browse files Browse the repository at this point in the history
This commit updates one of the styling tests to reset perf counters, making it order-independent and non-flaky (previously the test got random failures depending on whether there are other tests invoked before).

PR Close #45670
  • Loading branch information
AndrewKushnir authored and dylhunn committed Apr 19, 2022
1 parent ebf98c4 commit ed832b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/test/render3/instructions/styling_spec.ts
Expand Up @@ -97,6 +97,7 @@ describe('styling', () => {
});

it('should set class based on priority', () => {
ngDevModeResetPerfCounters();
ɵɵclassProp('foo', false);
ɵɵclassProp('foo', true); // Higher priority, should win.
expectClass(div).toEqual({foo: true});
Expand Down

0 comments on commit ed832b4

Please sign in to comment.