The problem was I was declaring the TemplateStore as a provider in the component annotation. Just removed it and the test worked as expected.
@Component({
selector: 'app-template-list-layout',
standalone: true,
providers: [/* REMOVED TEMPLATE STORE */],
templateUrl: './template-list-layout.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TemplateListLayoutComponent {
templateStore = inject(TemplateStore);