angular/packages/platform-server/test/render_spec.ts
Kristiyan Kostadinov f5b50ec20d refactor: clean up explicit standalone flags from tests (#63963)
Since standalone is the default, we can dropn the `standalone: true` flags from our tests.

PR Close #63963
2025-09-22 14:27:34 +00:00

38 lines
1 KiB
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Component} from '@angular/core';
import {ssr} from './hydration_utils';
describe('renderApplication', () => {
it('should render ARIA attributes from attribute bindings', async () => {
@Component({
selector: 'app',
template: '<div [attr.aria-label]="label"></div>',
})
class SomeComponent {
label = 'some label';
}
const html = await ssr(SomeComponent);
expect(html).toContain('aria-label="some label"');
});
it('should render ARIA attributes using property binding syntax', async () => {
@Component({
selector: 'app',
template: '<div [aria-label]="label"></div>',
})
class SomeComponent {
label = 'a third label';
}
const html = await ssr(SomeComponent);
expect(html).toContain('aria-label="a third label"');
});
});